Computer Science, asked by granthsharma41, 6 hours ago

write a program to print the series given below:
8
88
888
8888
88888
888888​

Answers

Answered by pranavith16012001
0

Answer:

for i in range(6) :

for j in range (i+1) :

print("8", end="")

print()

Explanation:

for explanation in python ping me

9550026427

Answered by Anonymous
1

 \sf \underline{Solution :  - }

Method 1 (Using single loop):

for i in range (6):

‎ ‎ ‎  print ("8"*(i+1))

‎ ‎ ‎

Method 2 (Using nested loops):

for i in range (6):

‎ ‎ for j in range (i+1):

    ‎ ‎  print ("8",end=" ")

‎ ‎  print ()

Output attached...

Attachments:
Similar questions