Hot answers tagged

1

Here's a really big hint. The right edge and bottom edge pixels are all bad, but the left and top are OK (except top right and bottom left). Have you taken a careful look at the limits for the right and bottom edges? Also what about how the right edge pixels are set? I suggest you carefully examine how the top right pixel is calculated vs. what it should ...


1

Look at the print line: print(f" " * spaces, "#" * (i + 1), "", "#" * j) Python will print a space after each element (ie, each item separated from the next by a comma). That means that it's printing the spaces, followed by an extra space. It's also printing a space after the first group of #s. Interestingly, the ...


1

There are multiple issues with the code. The height has to be between 1 and 8 inclusive. Your code will not allow a height of 8. Also, the user should be asked for the height until a proper number is given. Then, the program should print the two half pyramids. In your code, if there is a wrong input, then you question them once more and then exit. Also, ...


Only top voted, non community-wiki answers of a minimum length are eligible