Issue
I keep on getting the error message "expected an indented block"
month = int(input('Please enter a month in numeric form: '))
day = int(input('Please enter a day in numeric form: '))
year = int(input('Please enter a two-digit year in numeric form: '))
if month * day == year:
print ('The date is magic!')
else:
print ('The date is not magic.')
Solution
In Python, indentation is crucial. After each :
, you must indent at least at the next line so the interpreter understands the line belongs to the block.
if month * day == year:
print ('The date is magic!')
else:
print ('The date is not magic.')
I suggest you to gather more information on how indents work in Python
Answered By - Fukiyel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.