While loop project
Reference codeacademy lesson called loops
Need help writing this code
Create a program that
1) outputs the name priya 100 times (all on different lines)
2) output the name priya 100 times (10 on 10 lines)
3) output the sum of numbers from 1 to 1000
4) output the product of numbers from 1-8
5) list all the numbers from 100 down to 1
Complet in this order

Respuesta :

TJC07

Answer: Change this however you'd like :)

Explanation:

for n in range(100):

   print("priya")

print()

for n in range(10):

   for i in range(10):

       print("priya", end= " ")

   print()

print()

tempList = []

for n in range(1, 1001):

   tempList.append(n)

print(sum(tempList))

print()

for n in range(1, 9):

   for i in range(1, 9):

       print(n*i)

print()

x = 100

while x != 0:

   print(x)

   x -= 1