IN PYTHON: Fill in the blanks to complete the “rows_asterisks” function. This function should print rows of asterisks (*), where the number of rows is equal to the “rows” variable. The number of asterisks per row should correspond to the row number (row 1 should have 1 asterisk, row 2 should have 2 asterisks, etc.). Complete the code so that “row_asterisks(5)” will print: * * * * * * * * * * * * * * * def rows_asterisks(rows): # Complete the outer loop range to control the number of rows for x in range(___): # Complete the inner loop range to control the number of # asterisks per row for y in range(___): # Prints one asterisk and one space print("*", end=" ") # An empty print() function inserts a line break at the # end of the row print() rows_asterisks(5) # Should print the asterisk rows shown above
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
IN PYTHON:
Fill in the blanks to complete the “rows_asterisks” function. This function should print rows of asterisks (*), where the number of rows is equal to the “rows” variable. The number of asterisks per row should correspond to the row number (row 1 should have 1 asterisk, row 2 should have 2 asterisks, etc.). Complete the code so that “row_asterisks(5)” will print:
*
* *
* * *
* * * *
* * * * *
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images