-
Notifications
You must be signed in to change notification settings - Fork 0
/
zookeeper3.py
204 lines (177 loc) · 6.86 KB
/
zookeeper3.py
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
######### Description #########
# The third stage requires you to increase the capabilities of your software. Now it should be able to recognize the number of a specific habitat from the input and show the animals living there.
# Add all of the variables from the template to a single variable with the list type. The order of variables matters: they must appear on the list in the order in which they're defined in the code. The list must contain all of the variables with no duplicates.
######### Objectives #########
# In this stage your program should:
# Ask for the number of the desired habitat using the following phrase: Please enter the number of the habitat you would like to view:
# Use the input number as an index of your habitats to print its content.
# End with the following phrase:
# ---
# You've reached the end of the program. To check another habitat, please restart the watcher.
######### Examples #########
# The greater-than symbol followed by a space (> ) represents the user input. Notice that it's not part of the input.
######### Example 1 #########
# Please enter the number of the habitat you would like to view: > 5
# Switching on the camera in the rabbit habitat...
# ,
# /| __
# / | ,-~ /
# Y :| // /
# | jj /( .^
# >-"~"-v"
# / Y
# jo o |
# ( ~T~ j
# >._-' _./
# / "~" |
# Y _, |
# /| ;-"~ _ l
# / l/ ,-"~ \
# \//\/ .- \
# Y / Y
# l I !
# ]\ _\ /"\
# (" ~----( ~ Y. )
# It looks like we will soon have more rabbits!
# ---
# You've reached the end of the program. To check another habitat, please restart the watcher.
######### Example 2 #########
# Please enter the number of the habitat you would like to view: > 4
# Switching on the camera in the bat habitat...
# _________________ _________________
# ~-. \ |\___/| / .-~
# ~-. \ / o o \ / .-~
# > \\ W // <
# / /~---~\ \
# /_ | | _\
# ~-. | | .-~
# ; \ / i
# /___ /\ /\ ___\
# ~-. / \_/ \ .-~
# V V
# This bat looks like it's doing fine.
# ---
# You've reached the end of the program. To check another habitat, please restart the watcher.
######### My Code #########
camel = r"""
Switching on the camera in the camel habitat...
___.-''''-.
/___ @ |
',,,,. | _.'''''''._
' | / \
| \ _.-' \
| '.-' '-.
| ',
| '',
',,-, ':;
',,| ;,, ,' ;;
! ; !'',,,',',,,,'! ; ;:
: ; ! ! ! ! ; ; :;
; ; ! ! ! ! ; ; ;,
; ; ! ! ! ! ; ;
; ; ! ! ! ! ; ;
;,, !,! !,! ;,;
/_I L_I L_I /_I
Look at that! Our little camel is sunbathing!"""
lion = r"""
Switching on the camera in the lion habitat...
,w.
,YWMMw ,M ,
_.---.._ __..---._.'MMMMMw,wMWmW,
_.-"" ''' YP"WMMMMMMMMMb,
.-' __.' .' MMMMW^WMMMM;
_, .'.-'"; `, /` .--"" :MMM[==MWMW^;
,mM^" ,-'.' / ; ; / , MMMMb_wMW" @\
,MM:. .'.-' .' ; `\ ; `, MMMMMMMW `"=./`-,
WMMm__,-'.' / _.\ F'''-+,, ;_,_.dMMMMMMMM[,_ / `=_}
"^MP__.-' ,-' _.--"" `-, ; \ ; ;MMMMMMMMMMW^``; __|
/ .' ; ; ) )`{ \ `"^W^`, \ :
/ .' / ( .' / Ww._ `. `"
/ Y, `, `-,=,_{ ; MMMP`""-, `-._.-,
(--, ) `,_ / `) \/"") ^" `-, -;"\:
The lion is roaring!"""
deer = r"""
Switching on the camera in the deer habitat...
/| |\
`__\\ //__'
|| ||
\__`\ |'__/
`_\\ //_'
_.,:---;,._
\_: :_/
|@. .@|
| |
,\.-./ \
;;`-' `---__________-----.-.
;;; \_\
';;; |
; | ;
\ \ \ | /
\_, \ / \ |\
|';| |,,,,,,,,/ \ \ \_
| | | \ / |
\ \ | | / \ |
| || | | | | |
| || | | | | |
| || | | | | |
|_||_| |_| |_|
/_//_/ /_/ /_/
Our 'Bambi' looks hungry. Let's go to feed it!"""
goose = r"""
Switching on the camera in the goose habitat...
_
,-"" "".
,' ____ `.
,' ,' `. `._
(`. _..--.._ ,' ,' \ \
(`-.\ .-"" ""' / ( d _b
(`._ `-"" ,._ ( `-( \
<_ ` ( <`< \ `-._\
<`- (__< < :
(__ (_<_< ;
`------------------------------------------
The goose is staring intently at you... Maybe it's time to change the channel?"""
bat = r"""
Switching on the camera in the bat habitat...
_________________ _________________
~-. \ |\___/| / .-~
~-. \ / o o \ / .-~
> \\ W // <
/ /~---~\ \
/_ | | _\
~-. | | .-~
; \ / i
/___ /\ /\ ___\
~-. / \_/ \ .-~
V V
This bat looks like it's doing fine."""
rabbit = r"""
Switching on the camera in the rabbit habitat...
,
/| __
/ | ,-~ /
Y :| // /
| jj /( .^
>-"~"-v"
/ Y
jo o |
( ~T~ j
>._-' _./
/ "~" |
Y _, |
/| ;-"~ _ l
/ l/ ,-"~ \
\//\/ .- \
Y / Y
l I !
]\ _\ /"\
(" ~----( ~ Y. )
It looks like we will soon have more rabbits!"""
# Create a list with all the habitats
habitats = list([camel, lion, deer, goose, bat, rabbit])
user_input = int(input(r"Please enter the number of the habitat you would like to view: "))
# Iterate through the habitats list to pull out the index matching the user input
for i in range(len(habitats)):
if user_input == i:
print(habitats[i])
print("---\nYou've reached the end of the program. To check another habitat, please restart the watcher.")