Python program to find sum of 50 natural number.
Answers
Answered by
28
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.
Explanation:
please mark me brilliant ❤️
Similar questions