I am new to python and trying to implement a basic if else statement, but it keeps on throwing error at else statement. Below is my code.
if c == "July":
print ("7/1/2017")
else:
print ("sorry")
I am new to python and trying to implement a basic if else statement, but it keeps on throwing error at else statement. Below is my code.
if c == "July":
print ("7/1/2017")
else:
print ("sorry")
if c=="July":
print("7/1/2017")
else:
print("sorry")
Indentation matters in python!
if c == "July":
print ("7/1/2017")
else:
print ("sorry")
Correct your indentation