Input and if statement

Input and if statement

1
x = int(input("Please enter an integer: "))
2
if x < 0:
3
x = 0
4
print('Negative changed to zero')
5
elif x == 0:
6
print('Zero')
7
elif x == 1:
8
print('Single')
9
else:
10
print('More')
Copied!
Last modified 1yr ago
Copy link