So, I am tackling this one:
class Rectangle:
def __init__(self, width, height):
self.width = width
self.height = height
def get_picture(self):
a = ""
if self.width >= 50 or self.height >= 50:
print("Too big for picture.")
else:
for i in range(self.width):
a += "*"
for j in range(self.height):
print(a + "\n")
R1 = Rectangle(5,4)
print(R1.get_picture())
It draws the piucture but at the end a line with None
is displayed:
*****
*****
*****
*****
None
I am chasing my tail trying to figure it out… I haven’t tried this at the repl so no link to that yet… Can someone please tell me what am I doing wrong?