Question: I am learning Python 3.6.5 and trying to solve this homework problem in myprogramminglab. The question is. For this problem, display a right triangle with
I am learning Python 3.6.5 and trying to solve this homework problem in myprogramminglab. The question is. For this problem, display a right triangle with the vertical leg on the left and the slope leg going from the top left going right. The right angle should be on the bottom left. You need only draw the two legs using a single # per leg per line. You can achieve this using a nested loop so that the inner loop runs as many times as the current count of the outer loop. See programs 4-18 to 4-20 in your textbook for examples.
My solution:
print('Enter number of lines for pattern:')
number = int(input())
for rows in range(number):
print('#', end='')
for columns in range(rows):
print(' ', end='')
print('#')
The only feedback I get from myprogramminglab is " Attention: the difference between your stdout and the expected stdout is just a question of spacing." I even asked my professor and he said my answer is correct. I am just not answering in the way that the programminglab likes for me to aka make it more simple. How can I make this more simple or what am I doing wrong that causes 'question of spacing'?
Below is what I am getting

Failed Test Run #1 The contents of your standard output is incorrect Attention: the difference between your stdout and the expected stdout is just a question of spacing. Interactive Session-W Hide Invisibles Highlight: None Show Highlighted Only Your Code's Actual Result: Expected Result: Enter.number of.lines for pattern:5 el Enter number-of-1ines.for pattern:5 ##d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
