+ 3

Need assistance in typing conversion

in python print(float(input(..............)))

25th Aug 2018, 10:47 PM
DevMukhtar
DevMukhtar - avatar
5 Respostas
+ 3
then is the \n necessary
25th Aug 2018, 11:13 PM
DevMukhtar
DevMukhtar - avatar
+ 2
then how do you write please Enter another number
25th Aug 2018, 11:04 PM
DevMukhtar
DevMukhtar - avatar
+ 2
tried it and output was unexpected continuation character.
25th Aug 2018, 11:12 PM
DevMukhtar
DevMukhtar - avatar
+ 1
this would generate an error because you could not pass a statement to print() in python ( same as print(i++). thus you should do like this: NUM=float (input("please enter a number: \n")) print (NUM)
25th Aug 2018, 11:02 PM
Ramzi Zelfani
Ramzi Zelfani - avatar
0
the same way. just save the second input to a second variable
25th Aug 2018, 11:09 PM
Ramzi Zelfani
Ramzi Zelfani - avatar