Code printing correct output too many times (CS50)
I am very new to coding and learning via Harvard’s free CS50 course. Problem set 1 has been difficult, and I think I’m making it more challenging by doing things the hard way, ie I am trying to create functions for my code to get acclimated to how creating functions works. The task is to make a left-aligned pyramid with a height between 1 and 8. I’ve created functions to get the height from the user and to print the pyramid. The issue is with how the pyramid is printing. It prints correctly, but too many times. So, if the user types ‘3’ when prompted for the height, it should print this:
Code printing correct output too many times (CS50)
I am very new to coding and learning via Harvard’s free CS50 course. Problem set 1 has been difficult, and I think I’m making it more challenging by doing things the hard way, ie I am trying to create functions for my code to get acclimated to how creating functions works. The task is to make a left-aligned pyramid with a height between 1 and 8. I’ve created functions to get the height from the user and to print the pyramid. The issue is with how the pyramid is printing. It prints correctly, but too many times. So, if the user types ‘3’ when prompted for the height, it should print this: