Ask coding questions

← Back to all posts
"None" appears in my input box
IanJSM

I am unable to figure out why "None" is displayed where there should be an empty input box. After some looking, it only happens when the input is inside of the 'while' loop. I would really like to remove the "None", as it takes away from the look and feel of the program. If you know why it does this, please let me know!
Thanks!
Link to the program

Answered by CosmicBear [earned 5 cycles]
View Answer
Voters
IanJSM
Comments
hotnewtop
CosmicBear

There's no need for the print function. Use input('Guess the random number: ')

IanJSM

Thank you very much, @CosmicBear!

MrVoo

Fun fact, input() always returns a string, so you don't need str()