Oct-26-2020, 04:22 AM
(This post was last modified: Oct-26-2020, 04:30 AM by deanhystad.)
Stop posting links. Paste your code directly into your post and surround it with python tags. Like this:
for i in [12, 16, 17, 24, 29]: if i % 2 == 1: break print(i) print("done")You should not be typing programs in the shell. Type programs in a file and run the file. If you have to type code in the shell you need to add empty lines at the end of a compound statement so Python knows when it reached the end of a statement
for i in [12, 16, 17, 24, 29]: if i % 2 == 1: break print(i) print("done")Also note that you cannot cut and paste multiple statements in the shell. The shell is for one statement at a time. This is one statement:
for i in [12, 16, 17, 24, 29]: if i % 2 == 1: break print(i)And this is another.
print("done")You need to press the enter key to execute the first statement before you start entering the second.