Question: make _ number _ pyramid function 1 . Create parameter for the number of rows from the caller of the function 2 . Create a

make_number_pyramid function
1. Create parameter for the number of rows from the caller of the function
2. Create a string variable that will be returned. Start as an empty string.
3. Create a loop from 0 to the number of rows (including the number of rows value)
a. Create a string variable for the row of text
b. Create a loop from 0 to the current row number
i. Create a conditional to concatenate a space to the text if it's not the first character of the row
ii. Concatenate the row number to the string
c. Add the row of text string to the message variable. Make sure to add a newline at the end
4. Return the string message

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!