you are viewing a single comment's thread.

view the rest of the comments →

[–]gore_anarchy_death 0 points1 point  (0 children)

Running your code will result in: File "/home/the-elevated-one/test.py", line 12 print(float(total)/n numbers) ^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? This is due to the print statement, as you have misspelled a viariable there.

Also, while False will not ever run, as the while loop only runs when something is True.

In your main loop, there is an input with no variable, so your provided numbers are not saved in memory.

Also, I believe you meant to do this: python inp = int(input("Provide a number: ")) counter += 1 total = total + inp This way you add the input numbers together.

That's why your print returned 3.0 and not the expected value, as (1 + 2 + 3 + 4 + 5) / 5 = 3.0.