Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
formacion
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Antonio Calero
formacion
Commits
a4121b19
Commit
a4121b19
authored
Jun 05, 2018
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archivo en python
parent
c6597d65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
2x2grid.py
2x2grid.py
+34
-0
No files found.
2x2grid.py
0 → 100755
View file @
a4121b19
def
do_twice
(
f
):
f
()
f
()
def
do_four
(
f
):
do_twice
(
f
)
do_twice
(
f
)
def
print_head
():
print
'+ - - - -'
,
def
print_col
():
print
'| '
,
def
print_headers
():
do_twice
(
print_head
)
print
'+'
def
print_footers
():
print_headers
()
def
print_cols
():
do_twice
(
print_col
)
print
'|'
def
print_row
():
print_headers
()
do_four
(
print_cols
)
def
print_grid
():
do_twice
(
print_row
)
print_footers
()
print_grid
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment