Computer Science, asked by itznk12, 2 days ago

Write a program to print the sum of the first ten natural numbers using the ‘while’ loop in Python language.

Answers

Answered by Anonymous
1

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

s = 0

while n <= 10:

s = s + n

print(s)

Similar questions