Mar-08-2021, 04:04 PM
You have to un-indent if you are using the IDLE shell.
Your problem is you completed the if statement before entering else. You do not want to see ">>>" because that means you are done with the expression.
Output:>>> if 5 > 3:
print('hi')
else:
print('ho')
hi
After entering "print('hi')" the next line was indented to the same level. I just hit the backspace key end entered "else:"Your problem is you completed the if statement before entering else. You do not want to see ">>>" because that means you are done with the expression.