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

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 Databases Questions!