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

Computer Programming 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 enter a number of rows and a number of columns. The program will then print a pattern based on the user's input. The pattern follows these rules:
If the row is even numbered (2nd,4th, etc.) and the column is even numbered, then the character in that spot will be a blank or space character.
Otherwise, the character in that spot will be an asterisk: "*"
Sample output 1:
How many rows? 7
How many columns? 7
*******
****
*******
****
*******
****
*******
Sample output 2:
How many rows? 6
How many columns? 12
************
******
************
******
************
******
HINT: Be careful about how the numbers work in your program. Often times a program may be counting numbers starting with 0 when a user may be counting from 1.
HINT: When determining if a number is even or odd, the modulus or remainder operator can be very helpful.
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.
ONLY replace every instance of "--Fill this in--" with correct code that will enable the program to generate the patterns shown above.
Run this program using the PyCharm Terminal.
Take a screenshot of the Terminal that includes the line showing where you started the program run with the results.
Name the screenshot Lab03P2-ouput.jpg.#
# Student Name
# Date
# Pretty Pattern Generator
#
# NOTE: With the range functions, you may use
# one, two, or three parameters to accomplish
# your task.
FillThisIn = None # Replace FillThisIn with correct code below
# Ask the user for the number of rows
num_rows = FillThisIn
# Ask the user for the number of columns
num_columns = FillThisIn
# Iterate over the rows.
for row in range(FillThisIn):
# Iterate over the columns.
for col in range(FillThisIn):
# Test if the row and column are even numbered
if Fillthisin and FillthisIn:
print('', end='')
else:
print('**', end='')
# Go to the next row.
print()
 Computer Programming PROBLEM 2 In this problem, you are given a

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!