Drop links or images here to add them to the editor.

The last make task of the chapter, and the one where the loop does more than repeat: it collects an answer while it goes.

Your task

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.

The output

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

Example

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.

Help! My code doesn't work!

Make sure that you check for the following things:

  • The variable that holds the total is created before the loop and given the value 0. Create it inside and it is wiped on every repetition.
  • The line that adds to the total is inside the loop.
  • The print of the total is not indented, so it runs once, after the loop.
  • Every answer is wrapped in int(), or Python joins the three numbers into one piece of text instead of adding them up.
  • The counter is wrapped in str() where it is joined onto the question text.
  • The questions are numbered 1, 2, 3, so a range starting at 0 needs adjusting.