Answers for "write a program to print the sum of the first 10 multiples of number input by the user in pyhton"

0

python sum of 10 numbers from user input

a_list = []
print("Please enter 10 numbers with or without decimalsn")

for num in range(10):
    list_num = float(input("Enter a number:"))
    a_list.append(list_num)
print(sum(a_list))
Posted by: Guest on August-21-2020
0

sum of multiples of 3 or 5 python

total = []

for num in range(0,1001):
    if (num % 3 == 0) or (num % 5 == 0):
        total.append(num)
        
print(sum(total))
Posted by: Guest on August-02-2021

Code answers related to "write a program to print the sum of the first 10 multiples of number input by the user in pyhton"

Python Answers by Framework

Browse Popular Code Answers by Language