Skip to content

Completed ch 4 Character Picture Grid project from the book "Automate the Boring Stuff with Python"

Notifications You must be signed in to change notification settings

joesizzlin/characterPictureGrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

characterPictureGrid

This is my completed chapter 4 practice project, Character Picture Grid, from the book "Automate the Boring Stuff with Python" By: Al Sweigart

Below are the objectives:

  • You have a list of lists where each value in the inner lists is a one-character string, like this:
    grid = [['.', '.', '.', '.', '.', '.'],
           ['.', 'O', 'O', '.', '.', '.'],
           ['O', 'O', 'O', '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 charactor at the x- and y-coordinates.
  • (0, 0) will be upper-left corner, the x-coordinates increase going right and y- increase doing down
  • Use the previous grid value and write code that uses is to print the image:
. . O O . O O . . 
. O O O O O O O . 
. O O O O O O O . 
. . O O O O O . . 
. . . O O O . . . 
. . . . O . . . . 

More details are commented in characterPictureGrid.py

This project is done, so feel free to comment or collaberate.

About

Completed ch 4 Character Picture Grid project from the book "Automate the Boring Stuff with Python"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages