Answer:
Question 4 => 4th answer: The first line should be for x in range (7, 10):
Question 5 => 2nd answer: 14 16 18 20 22 24 26 28 30 32
Explanation:
<u>Question 4</u>
"for" loops always need a variable (like "x") defined to iterate with different values. <em>for x in range (7, 10):</em> makes x to take values 7, 8, 9 and 10 successively and execute <em>print(x)</em> each time.
<u>Question 5</u>
The expression <em>x in range (7, 16)</em> makes x to take values from 7 up to 16 inclusive. So for each iteration it will execute <em>print x*2</em> which prints the double of the actual value for x. Starting with x=7, it will print 14, then with x=8 will print 16, and so on. All values are shown on the table below:
X Prints
7 14
8 16
9 18
10 20
11 22
12 24
13 26
14 28
15 30
16 32