0

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")
Dhruv Kadia
  • 61
  • 1
  • 11

2 Answers2

1
if c=="July":
    print("7/1/2017")
else:
    print("sorry")

Indentation matters in python!

Kwahn
  • 428
  • 2
  • 11
0
if c == "July":
    print ("7/1/2017")
else:
    print ("sorry")

Correct your indentation

Nimish Bansal
  • 1,619
  • 3
  • 17
  • 34