Hello! Now that we know some of the basics of printing, it’s time to learn a little bit about variables and then use that knowledge to make a program that handles user input. At the end of the post, we’ll have a program that takes user input and uses it to solve a math problem (exciting!). First, we’ll type in some code in the Eclipse editor and then we’ll go over what each part of the code means.
print("Hello there! What's your name?" )
user_input = input ("Enter your name : ")
print("Howdy ", user_input , "!")
Run the code in Eclipse, then click inside the console at the bottom, type in your name, and press Enter. If you copied the code exactly as above, you should see this:
Now, let’s go through the code above…
View original post 986 more words