saving . . . saved error regarding for loop has been deleted. error regarding for loop has been hidden .
error regarding for loop
Title
Question
In [9]: %run -i sqrt_num_list.py
  File "C:\Users\gargr\sqrt_num_list.py", line 2
    for num in numbers
                      ^
SyntaxError: invalid syntax
the following is the notepad code:
numbers=[4,9,16,25,36]
for num in numbers
    print("sqrt of", num, "is", num**0.5)
print("This is outside for-loop")

Python-3.4.3 Getting-started-with-for 03-04 min 30-40 sec 29-04-20, 5:30 p.m. gargrishabh475@gmail.com

Answers:

<span style="background-color: rgb(250, 250, 250);">Your script has a syntax error in for num in numbers.You need to add a colon after the for statement like this </span>for num in numbers:
29-04-20, 5:43 p.m. aditya94palaparthy@gmail.com


Log-in to answer to this question.