Skip to content
← Back to Community
"None" appears in my input box
Profile icon
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
Profile icon
IanJSM
Comments
hotnewtop
Profile icon
CosmicBear

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

Profile icon
IanJSM

Thank you very much, @CosmicBear!

Profile icon
MrVoo

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