+ 2

How can I promt user input

27th Oct 2020, 1:17 PM
Timi
Timi - avatar
4 Respostas
+ 4
I guess you're asking about Python... In Python, use input(" ") to get user input. The input would be a string. You can convert it to integer or float using int() or float() respectively.
27th Oct 2020, 1:29 PM
Rahul Hemdev
Rahul Hemdev - avatar
+ 4
If you are using sololearn playground, you will not get any user prompt and you can't print out anything before input is taken.. This is due the special input behaviour of playground. Input for playground is taken in advance before any code from you will be executed.
27th Oct 2020, 3:34 PM
Lothar
Lothar - avatar
+ 2
Thanks
27th Oct 2020, 1:35 PM
Timi
Timi - avatar