Write a program to input twenty different numbers. Display the sum of those numbers
which are divisibe by 3 as well 5.
Answers
Answered by
4
The following cσdes have been written using Python.
l = list()
for i in range(20):
x = int(input("Enter a number: "))
l.append(x)
print()
print(l, "is your given list.")
print()
sl = list()
for i in l:
if i%3 == 0 and i%5 == 0:
sl.append(i)
print(sl, "is the list of numbers divisible by 3 and 5.")
print()
print(sum(sl), "is the sum of the list.")
Answered by
0
Answer:
WHERE IS THE OUTPUT PLEASE TELL THE OUTPUT OK GOVE ME THAT OUTPUT
Similar questions
Math,
1 month ago
Math,
1 month ago
English,
1 month ago
Math,
3 months ago
Social Sciences,
10 months ago
Computer Science,
10 months ago