The last make task of the chapter, and the one where the loop does more than repeat: it collects an answer while it goes.
Write a program that:
The three questions are numbered, and the number comes from the loop counter, so the loop has to ask the question as well as read the answer.
Three questions, each on its own line, where N is 1, 2 and then 3:
Enter number N
Then one last line, where TOTAL is the three numbers added together:
Total is TOTAL
Input:
10
20
30
Output:
Enter number 1
Enter number 2
Enter number 3
Total is 60
Input:
5
10
15
Output:
Enter number 1
Enter number 2
Enter number 3
Total is 30
The numbers can be negative as well, and your program does not need to treat
those any differently. With -4, 9 and -5 the last line reads Total is 0.
Ask each question with its own print, and read the answer with a bare
input() on the next line, rather than passing the question to input(...).
The questions are part of the output that is checked here, so their spelling,
capital letters and numbering count.
Make sure that you check for the following things:
print of the total is not indented, so it runs once, after the loop.int(), or Python joins the three numbers into one
piece of text instead of adding them up.str() where it is joined onto the question text.