How to use a for loop with input function
<p>I simply have to make a sum of three numbers and calculate the average</p>

<pre><code>import sys
sums=0.0
k=3
for w in range(k):
    sums = sums + input("Pleas input number " + str(w+1) + " ")
print("the media is " + str(sums/k) + " and the Sum is " + str(sums))
</code></pre>

<p>And the error :</p>

<pre><code>Pleas input number 1 1
Traceback (most recent call last):
  File "/home/user/Python/sec001.py", line 5, in &lt;module&gt;
    sums = sums + input("Pleas input number " + str(w+1) + " ");
TypeError: unsupported operand type(s) for +: 'float' and 'str'
</code></pre>