0
Why is this program saying two when 2 input 1
Input() If input ==1: print("one") else: print("two")
2 Réponses
+ 4
incomplete code.
hoping you mean
if input() == 1 :
print("one)
else :
print(" two")
Input accept input in the form of strings.. So you need to cast it to int like int(input())
Now check this code :
if int(input()) == 1 :
print("one)
else :
print("two")
+ 2
i = int(input())
if i ==1:
print("one")
else:
print("two")