Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
T
teach-unit-testing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Metrics
Incidents
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Carles
teach-unit-testing
Commits
9e0a8bce
Commit
9e0a8bce
authored
Aug 25, 2020
by
cmateoioliver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tree from lesson 0.
parent
e3bef177
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
lesson0/tree.py
lesson0/tree.py
+43
-0
No files found.
lesson0/tree.py
0 → 100644
View file @
9e0a8bce
import
time
def
get_small_tree
():
s_tree
=
" *
\n
"
+
\
" ***
\n
"
+
\
" *****
\n
"
+
\
" *******
\n
"
+
\
" *********
\n
"
+
\
" |
\n
"
+
\
" |
\n
"
+
"
\n
"
return
s_tree
def
print_medium_tree
():
print
(
" * "
)
print
(
" *** "
)
print
(
" ***** "
)
print
(
" ******* "
)
print
(
" ********* "
)
print
(
" *********** "
)
print
(
"*************"
)
print
(
" | "
)
print
(
" | "
)
print
(
" | "
)
print
(
" | "
)
print
(
""
)
i_tree_counts
=
1
i_tree_wanted
=
5
while
i_tree_counts
<=
i_tree_wanted
:
print
(
"Iteration number:"
)
print
(
i_tree_counts
)
if
i_tree_counts
>
3
:
print_medium_tree
()
else
:
s_small_tree
=
get_small_tree
()
print
(
s_small_tree
)
time
.
sleep
(
1
)
i_tree_counts
=
i_tree_counts
+
1
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