Question: Problem 2 In this problem, you are given a partially completed program, and you need to update and fill in the rest of the program

Problem 2

In this problem, you are given a partially completed program, and you need to update and fill in the rest of the program to produce the desired output.

This program should ask the user to input a character to print and a number of rows. The program will then print a pattern based on the user's input.

Problem 2 In this problem, you are given a partially completed program,

Lab03P2-FillThisIn.py

# Pretty Pattern Generator # # Ask the user for the character to print character = "Fill this in" # Ask the user for the number of rows and columns size = "Fill this in" # Iterate over the rows. for row in range("Fill this in"): # Each row has fewer columns. for col in range("Fill this in", "Fill this in", "Fill this in"): print(character, end='') # Go to the next row. print()

-------------------------------------------------------------------------------------------------------------------------

  • The instructor has provided a file called Lab03P2-FillThisIn.py. Download that file and rename it Lab03P2.py.
  • Copy that file into your PyCharm project.
  • Change the program header to include your name and the date.
  • Replace every instance of "--Fill this in--" with correct code that will enable the program to generate the pattern shown above.

Sample output 1: What character do you want to print? * How many rows and columns? 7 ****** Sample output 2: What character do you want to print? $ How many rows and columns? 5 $$$$$ $$$$ $$$ $$ S V) u

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!