Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Students/Rperkins/break_me.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
def NameWrong():
d = seven
return
def TypeWrong():
f = 14.2
len(f)
return
def SyntaxWrong():
x = len("four
return
def AtrribWrong():
f = "1234"
f.rocket
return
31 changes: 31 additions & 0 deletions Students/Rperkins/grid_build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
def Rowline(size, column):
# prints an "x", then a number of "-"s (scaled by the "size" parameter),
# for each count of the "column" parameter
for i in range(column):
print "+",
for x in range(4 + (size-1)):
print "-",
print "+" # the "bookend" character
return

def Columnline(size, column):
# prints an "|", then a number of " "s (scaled by the "size" parameter),
# for each count of the "column" parameter
for i in range(column):
print "|",
for x in range(4 + (size-1)):
print " ",
print "|" # the "bookend" character
return

def PrintGrid(size, row, column):
# the outer loop prints a "row" number of rowlines
# the inner loop prints a number of column lines scaled
# by the "size" parameter
for i in range(row):
Rowline(size, column)
for i in range(4 + (size-1)):
Columnline(size, column)
Rowline(size, column) # the "bookend" row

PrintGrid(1,2,2)