Jan-17-2019, 05:53 AM
This was the given question :
Write a Python program that prints all the numbers from 0 to 6 except 3 and 6.
Note : Use 'continue' statement.
Expected Output : 0 1 2 4 5
This is my code :
Write a Python program that prints all the numbers from 0 to 6 except 3 and 6.
Note : Use 'continue' statement.
Expected Output : 0 1 2 4 5
This is my code :
for i in range(6): if i == 3: continue elif i == 6: continue else print iand error output :
Error:CaiGengYangs-MacBook-Pro-2:Lesson 1 caigengyang$ bash Question8.py
Question8.py: line 5: syntax error near unexpected token `('
Question8.py: line 5: `for i in range(6):'
Please advise thanks