• 0 Posts
  • 27 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle

  • I think you’ve already gotten some good answers here regarding the function itself:

    It sits and waits for the user to input something and hit Enter, and returns the value the user entered, which is then assigned to your nam variable. (See the documentation for the function.

    I might also offer the advice of confirming your understanding of the flow of a program. That is, understand that, in the general sense, the computer must resolve the right-hand side of the equals sign to a value before it can assign it to the left.

    For example, if the right-hand side is a literal value, it’s already resolved. For example, a line like name = “Joe” is easy—assign the string literal “Joe” to the variable name, when the line is run.

    If the right hand side is a mathematical equation, it must be resolved to a value when the line is run. For example, for a line like value = 2+2, the 2+2 must be resolved to 4 before it can be assigned to the variable.

    Then, for something like name = input(“Who are you?”), in order to resolve the right-hand side, the computer must first run the function before it can assign a value to the variable name.

    It can, of course, get more complicated, where you can call multiple functions on a line, and the results of one feed into the next, and so on. But, that can be an exercise for the near future.











  • “This is television, that’s all it is. It has nothing to do with people, it’s to do with ratings! For fifty years, we’ve told them what to eat, what to drink, what to wear… for Christ’s sake, Ben, don’t you understand? Americans love television. They wean their kids on it. Listen. They love game shows, they love wrestling, they love sports and violence. So what do we do? We give 'em what they want! We’re number one, Ben, that’s all that counts, believe me. I’ve been in the business for thirty years.”





  • I appreciate how far NA beers have come since O’Douls. It’s gotten to the point where I can much more easily replace the want for a certain kind of beer in some situations—a party, working out in the yard, eating certain foods—with a Partake or an Athletic, and not feel like I’m missing something.

    But, gosh, I want someone other than Guinness to make a good NA stout.