ashish chaudhary
Python & AII wrote an if statement, but the following print line gives an indentation error.
ready = True
if ready:
print("Ready to learn")
CookieSensei starter Q&A · example discussion.
Loading…
I wrote an if statement, but the following print line gives an indentation error.
ready = True
if ready:
print("Ready to learn")
CookieSensei starter Q&A · example discussion.
Python uses indentation to show which statements belong inside a block. Indent the print line underneath the if statement. Four spaces per indentation level is the usual convention. Keep indentation consistent and avoid mixing tabs and spaces. A line aligned back with if is outside that block.
ready = True
if ready:
print("Ready to learn")
CookieSensei starter Q&A · example discussion.