Question: Lab: Number Pyramids Description Write a program in Python that builds a number pyramid based on a given height. Name your file number _ (
Lab: Number Pyramids
Description
Write a program in Python that builds a number pyramid based on a given height.
Name your file "numberpyramidpy Be sure that your output matches the example format exactly, including any spacing and punctuation.
Bonus
Modify the program to create an inverted pyramid below the original, as shown in the bonus output.
Example runs:
Enter the height of the pyramid:
Enter the height of the pyramid:
Bonus:
Enter the height of the pyramid:
Planning Tips
You will need an outer loop to go through the rows, and two inner loops:
The first will print padding spaces, Note that each row has total rows current row spaces padding the start...The second will print the numbers for the current row. Note that each row has row numbers in it
Remember that you can specify the end parameter for the print function so that it does not create a newline by passing in an end argument. Lab: Number Pyramids
Description
Write a program in Python that builds a number pyramid based on a given height.
Name your file "numberpyramid.py Be sure that your output matches the example format exactly, including any spacing and punctuation.
Bonus
Modify the program to create an inverted pyramid below the original, as shown in the bonus output.
Example runs:
Enter the height of the pyramid:
Enter the height of the pyramid:
Bonus:
Enter the height of the pyramid:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
