forked from amonmillner/SoftwareDesignFall14
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrid.py
More file actions
62 lines (49 loc) · 725 Bytes
/
Copy pathgrid.py
File metadata and controls
62 lines (49 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 9 14:47:52 2014
This program creates 2 sorts of grids, one 2 by 2, the
other a 4 by 4.
@author: Elena
"""
m= '- '*4
p= '+'
l= '|'
s= ' '*8
def horiz2():
print p,m,p,m,p
def horiz4():
print p,m,p,m,p,m,p,m,p
def vert2():
print l,s,l,s,l
def vert4():
print l,s,l,s,l,s,l,s,l
def v24():
vert2()
vert2()
vert2()
vert2()
# part 1
def grid():
horiz()
v24()
horiz()
v24()
horiz()
grid()
# part 2
def v44():
vert4()
vert4()
vert4()
vert4()
def double_grid():
horiz4()
v44()
horiz4()
v44()
horiz4()
v44()
horiz4()
v44()
horiz4()
double_grid()