Do I have to input numbers. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Do I have to input numbers.

Whenever I write X = input(python is awesome) Print (x) It says I have to put “input” in what do I put in

23rd Jan 2019, 11:55 AM
Ryan John Colley
2 Answers
+ 2
input() returns a string by default, so it will return a string unless implicitly told otherwise.
23rd Jan 2019, 12:13 PM
Dread
Dread - avatar
+ 2
First there are some errors in your code X = input("python is awesome") print(X) Then after running it you will get a prompt in sololearn. You have to enter something into it and run the program. If no input is provided you will get an EOF error. Hope this helped
23rd Jan 2019, 12:31 PM
Seniru
Seniru - avatar