##### How to make a python program that asks how much numbers you want to add, and then adds it?

I want a python program that asks for how much numbers the user wants to add, then asks them for the numbers, and then prints the result.

ALSO please explain since im trying to learn python

**Voters**

xfinnbar (149)

Aivoybia (26)

```
addnumvar = 0
numofinput = int(input("How many numbers do you want to input?")
for i in range(numofinput):
addnum = int(input("Enter a number")
addnumvar += addnum
```

What I did was create a variable to add the numbers

Then I made an input to see how many numbers the user wants to add

Then I made a for loop and the range is the number the user input for the step above

Then I made another integer input and added it to addnumvar

Hope this helps, and have an awesome day!!! :D

###### Much love,

adityavengata (18)

@Aivoybia It gives me a syntax error for some reason