1. Engineering
  2. Computer Science
  3. for this question it asks to draw out the image...

Question: for this question it asks to draw out the image...

Question details

media%2F501%2F50173790-0b00-425f-a1a6-68

For this question, it asks to draw out the image with python. Could you please explain how to draw the image above and explain through comments what each line of code does? Another question is, how would I do this drawing if n was an even number?

In the image above, n = 7

Example/starter code from textbook pdf

n = int(input("Choose a number: "))

# Drawing Example
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