Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+5 votes

Hey guys,
In this question all my test cases are being passed except the last one
draw_square(1, 'unfilled')
does anyone have any suggestions related to it?

asked in CSC201 Spring 2021 by (8 points)

1 Answer

+2 votes

you see the reason why it's not passing for one and printing two is because the if function works for all the others number but not one. So my suggestion is to have another if function where if the size is 1 to print just one asterik. On the previous if function that checks if it's unfilled, add if the size not equals to one to not confuse python. Try debugging it to see how this would work.
Hope that helps

answered by (8 points)