Question: make _ number _ pyramid function 1 . Create parameter for the number of rows from the caller of the function 2 . Create a
makenumberpyramid function
Create parameter for the number of rows from the caller of the function
Create a string variable that will be returned. Start as an empty string.
Create a loop from 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 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
Return the string message
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
