December 13, 2016
Casting input to get what you want:
If you want numeric data from a string, you must assume that the user gave you what you want:
age=input(“What is your age?”)
print(“In 5 years you will be %i years old.” % int(age)+5 )
If you want (bad idea) y...
December 9, 2016
Remember the traditional program flow:
Input -> Processing -> Output
Input is defined in this context as data the user gives to the program. The program then uses that data in some way - manipulates it or just stores it in memory. Finally th...
November 30, 2016
December 2016 (7)
November 2016 (14)