Computer Science, asked by satyasuneethap, 12 hours ago

Write a program to print the series 1, 8, 27, 64, 125, 216….., 1000
(Use any looping statement i.e. for/while)
(OR)
Write a program to print 10 Natural numbers and their Sum.

in python pleawe

Answers

Answered by samarthkrv
4

Answer:

1)-

for i in range(1,11):

   print(i*i*i) #cubes of numbers

2)-

total = 0

print("First 10 natural numbers-")

for i in range(1,11):

   total += i

   print(i)

print("Sum of first 10 natural numbers is" , total)

Explanation:

Similar questions