Q.8
find the errors in the code given below and correct the code:
if n==0
print("zero")
elif:n==1
print("one")
elif
n==2
print("two")
else n==3
print("three")
Answers
Answered by
1
- Errors in the code are underlined below,
if n==0
print("zero")
elif:n==1
print("one")
elif
n==2
print("two")
else n==3
print("three")
- The correct code is given below,
n = int(input("Enter a number : "))
if n == 0:
print("zero")
elif n == 1:
print("one")
elif n == 2:
print("two")
elif n == 3:
print("three")
#SPJ3
Similar questions