Computer Science, asked by pragadeeshgj, 4 months ago

Write a python program to find the sum of 'n' given inputs​

Answers

Answered by Anonymous
0

Answer:

num = int(input("Enter a number: "))

if num < 0:

print("Enter a positive number")

else:

sum = 0.

# use while loop to iterate un till zero.

while(num > 0):

sum += num.

Similar questions