Computer Science, asked by sansriss, 4 months ago

Write a Python program to construct the following pattern, using a while loop.
/
//
///
////
/////

Answers

Answered by allysia
30

Language:

Python

Program:

n=int(input("Enter the number of rows:"))

for i in range(1,n+1):

   print('/'*i)

Output:

/

//

///

////

/////

//////

///////

Explanation:

  • n save the number of rows that are needed to be printed.
  • for loop print the character '/' and the product of the number of times the loop has ran.

Attachments:

Attachments:
Answered by darshan32186
10

Answer:/ / // / //// / / // / / / // /

//// / // / / //

Explanation:Everything on this course is a goldmine except for the GUI since it's specific for Jupyter Notebooks and it's missing the video for GUI Events. Still it was a nice introduction to GUI. Don't let that disappoint you though. THIS IS A MUST HAVE COURSE. I have already recommended it to few people and always will. Do yourself a favor and do this course if you want to learn Python 3. Thank you so much for this course, Jose-sensei!!

Similar questions