0

Little help needed with input()

If I want to print - "Enter a number" and store it's value in a variable (int/float) and then give output - "Your number is *entered_number* " . What will be the code for this?

5th Sep 2016, 5:53 PM
Rishabh Nishad
Rishabh Nishad - avatar
2 Respostas
+ 4
number1 = float(input('Enter your number')) print ('Your number is: ',number1) number2 = int(input('Enter your number')) print ('Your number is: ',number2)
5th Sep 2016, 6:12 PM
Ришат Султанов
Ришат Султанов - avatar
0
entered_number =input('Enter a number: ') entered_number = int(entered_number) print ('Your number is: ',entered_number)
6th Sep 2016, 4:17 AM
Ilene Gorski
Ilene Gorski - avatar