Lab 4

lab4 part 1- code

def print_beam():
print ‘+ – – – -‘,
def print_post():
print ‘| ‘,

print_beam()

print_post()

Lab 4 part 2 code

def print_beam():
print ‘+ – – – -‘,

def print_post():
print ‘| ‘,

def print_beams():
print_beam()
print_beam()
print ‘+’

def print_posts():
print_post()
print_post()
print ‘|’

print_posts()

Results

lab4_part3 code

def print_beam():
print ‘+ – – – -‘,

def print_post():
print ‘| ‘,

def print_beams():
print_beam()
print_beam()
print ‘+’

def print_posts():
print_post()
print_post()
print ‘|’

def print_row():
print_beams()
print_posts()
print_posts()
print_posts()
print_posts()

print_row()

Code for lab4 Part 4

def print_beam():
print ‘+ – – – -‘,

def print_post():
print ‘| ‘,

def print_beams():
print_beam()
print_beam()
print ‘+’

def print_posts():
print_post()
print_post()
print ‘|’

def print_row():
print_beams()
print_posts()
print_posts()
print_posts()
print_posts()

def print_grid():
print_row()
print_row()
print_beams()

print_grid()

Results for Lab 4 part 4