Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use Python to code: Character Picture Grid Say you have a list of lists where each value in the inner lists is a one-character

Please use Python to code:

image text in transcribedimage text in transcribed

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', '0', 'O','!!,!.'], ['O', 'O', 'O', 'O', 'O','.'], ['.', 'O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O','.'], ['O', 'O', 'O', 'O','',''), ['.', 'O', 'O','.','',''], [':',!!!,!.!.!.!.!.!,!.'] 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 is in the upper-left corner, the x-coordinates increase going right, and 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... ....O.... 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 finish 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions