What are the errors in the following code? Correct the code: x = ‘Jan’ if x = ‘Feb’ : print(“Second month”): elif x = ‘Mar’: print(“ Third Month”) else : print(“First Month) this is python btw help
Answers
Answered by
1
Answer:
You can write the same code correctly in python like this:
x = 'Jan'
if x == 'Feb':
print("Second month")
elif x == 'Mar':
print("Third month")
else:
print("First month")
Your error:
You forgot to close the quotes in the else block.
Similar questions