- 1

Write a program that calculates the average n numbers. The program will have n+1 inputs.

I got an error when I wrote >>>n= "24">>>n=n+1

14th Oct 2020, 2:28 PM
Noobpython
Noobpython - avatar
3 Answers
+ 3
This looks like a homework. Show us yout attempt and maybe we can help you. https://www.sololearn.com/discuss/1316935/?ref=app
14th Oct 2020, 2:29 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 2
One problem may be the type of the variable. If you want a number then n has to be type int. But if you write n = "7", that is a type string.
14th Oct 2020, 5:33 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
0
>>>n="7" >>>n+1
14th Oct 2020, 2:39 PM
Noobpython
Noobpython - avatar