Skip to content

Commit 212334a

Browse files
committed
tweaks
1 parent 821f8a2 commit 212334a

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

app/codeblocks.py

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -221,21 +221,21 @@ def futures_try_int_input(mocked_input_ret):
221221
@mark
222222
def conditions_names(mocked_input_ret):
223223
"""
224-
>>> Codeblocks.conditions_names('max')
225-
Weirdo
226-
>>> Codeblocks.conditions_names('jax')
227-
Cool name!
224+
>>> Codeblocks.conditions_names('Joshua')
225+
Greetings. Would you like to play a game?
226+
>>> Codeblocks.conditions_names('Dave')
227+
I'm sorry, Dave. I'm afraid I still can't open the podbay doors.
228228
>>> Codeblocks.conditions_names('foobarbaz')
229229
Hello, foobarbaz
230230
"""
231231
with patch('builtins.input') as input:
232232
input.return_value = mocked_input_ret
233233
# START
234234
user_input = input('What\'s your name?')
235-
if user_input == 'max':
236-
print('Weirdo')
237-
elif user_input == 'jax':
238-
print('Cool name!')
235+
if user_input == 'Joshua':
236+
print('Greetings. Would you like to play a game?')
237+
elif user_input == 'Dave':
238+
print("I'm sorry, Dave. I'm afraid I still can't open the podbay doors.")
239239
else:
240240
print('Hello, ' + user_input)
241241
# END
@@ -258,7 +258,6 @@ def conditions_boolean_logic():
258258
"""
259259
>>> Codeblocks.conditions_boolean_logic()
260260
At least one var is Foo!
261-
Same length OR combined length longer than ten!
262261
"""
263262

264263
# Experimenting with conditional logic can be more convenient in the interpreter
@@ -274,15 +273,6 @@ def conditions_boolean_logic():
274273
if not var_1 or not var_2:
275274
print('At least one var is falsey!')
276275

277-
length_var_1 = len(var_1)
278-
length_var_2 = len(var_2)
279-
280-
if length_var_1 == length_var_2 and length_var_1 + length_var_2 > 10:
281-
print('Same length AND combined length longer than ten!')
282-
283-
if length_var_1 == length_var_2 or length_var_1 + length_var_2 > 10:
284-
print('Same length OR combined length longer than ten!')
285-
286276
@mark
287277
def loops_scream():
288278
"""

0 commit comments

Comments
 (0)