git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]# The sum of ten numbers inserted from the user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

> x = 0 > for jnk in range(10): > x += int(input("Enter a number: ") > print(x) It works, there's a missed ) A colleague did: total=0 for n in range(10): n= int(input("Enter a number: ")) total=total+n print(total) I understood your code is more clean! ^Bart

- Prev by Date:
**how to exit from a nested loop in python** - Next by Date:
**My appreciation for python's great work to my country.** - Previous by thread:
**The sum of ten numbers inserted from the user** - Next by thread:
**The sum of ten numbers inserted from the user** - Index(es):