TDT4109/Exercise 4 - Inspera/16.py

12 lines
256 B
Python
Raw Permalink Normal View History

2020-10-01 12:05:45 +02:00
def energy_efficient_spamming(q1, q2):
try:
assert len(q1)>len(q2)
answer = input(q1)
while True:
if answer == 'stopp':
break
answer = input(q2)
except AssertionError:
return
energy_efficient_spamming('jadu', 'nei')