this question has answer here:
- how can read inputs integers? 14 answers
could please me understand why program doesn't output 'well done!' after input 1? thank you.
while true: o=input("enter 1:") if o==1: break print("well done!")
it looks you're using python3.x.
on python3.x, input always returns instance of str, o never equal 1 since you're comparing different types (str , int).
Comments
Post a Comment