Question: Write a python function print_pattern(n,m) that will take two integer values as parameters, n and m, and will print a pattern of n lines with
Write a python function print_pattern(n,m) that will take two integer values as parameters, n and m, and will print a pattern of n lines with m *. For example, a call to the function print_pattern(3,5) will generate the following pattern:
* * * * * * * * * * * * * * *
Hint: To prevent the print function from breaking a line you can specify the last character to be printed to be a white space as follows: print(*, end = )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
