Question: Python please! Q2: define a function call printstarx, which has two parameters. n parameter specifies how many stars to print on each row row parameter
Python please!
Q2: define a function call printstarx, which has two parameters. n parameter specifies how many stars to print on each row row parameter specify how many rows to print stars the row parameter should have a default value as 1. so this function will print a couple of rows, each row composed of n stars. You can call printstar(n) function in Q1 to work out this problem.
test your function by calling
printstarx(10) #which should print 1 row with 10 stars printstarx(10,5)# should print 5 rows, each with 10 stars
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
