Computer Science, asked by pragnahk7, 3 months ago

Please answer this for me ​

Attachments:

Answers

Answered by ItzAditt007
1

For Python:-

Program to print the sum of first 10 even number:-

n = 0

for i in range (0, 11):

if i%2 == 0:

n = n + i

print("Sum of first 10 even numbers is ",n)

Program to print the sum of first 100 natural numbers:-

n = 0

for i in range (1,101):

n = n+i

print("The Sum Of First 100 Nutural Numbers Is ", n)

Similar questions