1. Engineering
  2. Computer Science
  3. how to draw an image like this in python where...

Question: how to draw an image like this in python where...

Question details

media%2F79b%2F79b44483-8313-4a68-aa9d-03

How to draw an image like this in python where the number of rows is dependant on n? in this case the n =7

Could you also explain what each line of code does in drawing

Example starter code from pdf textbook below

n = int(input("Choose a number: "))
for row in range(n):
    for column in range(row+1):
        print('*', end='')
    print()
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution