Jun-26-2020, 04:58 PM
(This post was last modified: Jun-26-2020, 04:58 PM by pyzyx3qwerty.)
No need to do
You can do
if value==int('9'):Python doesn't understand what do you mean by that, and hence, doesn't produce the expected output
You can do
if value == 9 :If you want the input to directly become an integer, you can do
value = int(input("Enter a number: "))
pyzyx3qwerty
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs