Character Picture Grid Say you have a list of lists where each value in the inner lists is a one-character string, like this: grid - (['.', '.', ['.', '0', ', ,0. .0. .0. .0.] ['.', 'o', 'o', '0', ['0', '0', 'o', '0', 'o', ,0. ',0. '.0. .0.] ['.', '0', 'o', .0. .0. .0, '.o.] You can think of grid[x][y] as being the character at the x- and y-coordinates of a "picture" drawn with text characters. The (0, o) origin will be in the upper-left corner, the x-coordinates increase going right, and w the y-coordinates increase going down. Copy the previous grid value, and write code that uses it to print the image. ..00.00.. .0000000. .0000000. .00000.. ...000... ....0.... Hint: You will need to use a loop in a loop in order to print grid[0][0], then grid[1][0], then grid(2][0], and so on, up to grid[8][0). This will fin- ish the first row, so then print a newline. Then your program should print grid[0][1], then grid(1][1], then grid[2][1], and so on. The last thing your program will print is grid[8][5]. Also, remember to pass the end keyword argument to print() if you don't want a newline printed automatically after each print() call.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

 write programs to do the following tasks.

Character Picture Grid
Say you have a list of lists where each value in the inner lists is a one-character
string, like this:
grid - (['.',
['.', '0', ',
['O', 'o', 'o',
['O', 'o', 'o', '0', 'o',
['.', 'o', 'o', '0', 'o', 'o'],
['0', 'o', 'o', '0', 'o', '.'j,
['O', 'o', 'o', '0',
['.', '0', 'o',
'),
You can think of grid[x][y] as being the character at the x- and
y-coordinates of a "picture" drawn with text characters. The (0, 0) origin
will be in the upper-left corner, the x-coordinates increase going right,
and w the y-coordinates increase going down.
Copy the previous grid value, and write code that uses it to print the image.
.00.00..
.0000000.
.0000000.
..00000..
...000...
.0....
Hint: You will need to use a loop in a loop in order to print grid[0][0],
then grid[1][0], then grid[2][0], and so on, up to grid[8][0). This will fin-
ish the first row, so then print a newline. Then your program should print
grid[0][1], then grid[1][1], then grid[2][1], and so on. The last thing your
program will print is grid[8][5].
Also, remember to pass the end keyword argument to print() if you
don't want a newline printed automatically after each print() call.
Transcribed Image Text:Character Picture Grid Say you have a list of lists where each value in the inner lists is a one-character string, like this: grid - (['.', ['.', '0', ', ['O', 'o', 'o', ['O', 'o', 'o', '0', 'o', ['.', 'o', 'o', '0', 'o', 'o'], ['0', 'o', 'o', '0', 'o', '.'j, ['O', 'o', 'o', '0', ['.', '0', 'o', '), You can think of grid[x][y] as being the character at the x- and y-coordinates of a "picture" drawn with text characters. The (0, 0) origin will be in the upper-left corner, the x-coordinates increase going right, and w the y-coordinates increase going down. Copy the previous grid value, and write code that uses it to print the image. .00.00.. .0000000. .0000000. ..00000.. ...000... .0.... Hint: You will need to use a loop in a loop in order to print grid[0][0], then grid[1][0], then grid[2][0], and so on, up to grid[8][0). This will fin- ish the first row, so then print a newline. Then your program should print grid[0][1], then grid[1][1], then grid[2][1], and so on. The last thing your program will print is grid[8][5]. Also, remember to pass the end keyword argument to print() if you don't want a newline printed automatically after each print() call.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY