You are viewing a single comment's thread from:
RE: Python Programming For Beginners Lesson 3 - User Input
Yes, you are correct, so if you wanted to store an integer in a variable using the input function you would do something like this num = int(input("Enter a number: "))
or you could do this, the number will be stored as a string until you wish to use it print(int(num) + 5)
.
I appreciate the suggestion and I do have number input planned for the next lesson where I will be looking at operators and creating a very simple calculator program. This lesson was kind of the setup for that one so that I don't have to cover too much information in just one lesson.
Thanks for the feedback
Thanks for clarifying that.
Actually your comment is so succinct and nice that you can "pretty much" copy and paste it into your post above, heh.
But yeah if you've planned that already, do like you intended to - I just wanted to give you feedback! You're welcome fellow developer!