Question: numrows = 3 numcols = 3 for row in range ( numrows ) : if i % 2 = = 0 print ( *

numrows =3
numcols =3
for row in range(numrows):
if i%2==0
print("*", end="")
print()
Modify the code in PracTest1.py (see on right) to:
1. Correct any errors - get the given code working
2. Print alternating + and | characters (see sample output on right)
3. On each row, use a for loop to print the required + or --- characters
4. Add to code to have the user enter the number of rows and columns
5. For each user entry, test that it is in a valid range, use a loop to
ask them to re-enter the year and continue looping until it is valid, You can
assume the user enters an integer
6. After printing the grid, ask the user to enter a row and column within the grid
(validate that the numbers are in range counting from zero)
7. Print the grid again with an X in that position
8. Test your code with valid and invalid entries

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