+ 1

user input

I want to write a simple program such that the number entered is multiplied by 10 ie s = input('enter number:') print(s) what can I do to make this program give the output multiplied by 10 please help

17th Aug 2016, 8:00 AM
Emmett N. Lipholo
Emmett N. Lipholo - avatar
3 Réponses
+ 3
You can also make it so that the variable will be saved so you can re-print it without the need of re-multipling: s = int(input("enter number: ")) * 10 print(s)
17th Aug 2016, 3:43 PM
Moh Kur
Moh Kur - avatar
+ 2
s = int(input('enter number: \n')) print(s*10) use int () for get ghe input as integer and not as string
17th Aug 2016, 8:56 AM
‫Ido Tal
‫Ido Tal - avatar
0
s = int(input('enter number: \n')) divide = s*10 #you can use var for this print(divide)
17th Aug 2016, 8:34 PM
Ricky Joanne
Ricky Joanne - avatar