Write a Python function Pyramid() which takes a positive int value as the formal
ID: 3778667 • Letter: W
Question
Write a Python function Pyramid() which takes a positive int value as the formal parameter and returns no value. The value determines the number of rows of the pyramid. A pyramid has one star at the top and the number of stars increments by two on each subsequent row. (See the sample output in the starter code). Use the starter code to begin with. For this problem, you can use either for loops or while loops. Other rules and hints remain the same as above. def Pyramid(n): # Your code goes here def test pyramid (); for i in range(5, 12, 3): Pyramid (i) print () test pyramid () a test pyramid () output:Explanation / Answer
for 5 use
for 8 use
for 12 use
or else use thisloop
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.