Hi Rafael,
LogActivities = []
prompt = ("What have you done today? Enter 'quit' to exit. ")
while True:
activity = input(prompt)
# Do this here so 'quit' is not appended to the list
if activity == 'quit': # To get out of the loop
break
# If still in the loop, append t
On 19/03/17 12:17, Rafael Knuth wrote:
> LogActivities = []
> prompt = ("What have you done today? ")
> prompt += ("Enter 'quit' to exit. ")
I'm not sure why you put that on two lines but
thats just a nit pick...
> while True:
This will loop forever unless you explicitly break,
return or hit an
LogActivities = []
prompt = ("What have you done today? ")
prompt += ("Enter 'quit' to exit. ")
while True:
activity = input(prompt)
LogActivities.append(activity)
if activity == "quit":
print("Let me recap. This is what you've done today: %s." % ",
" .join(LogActivities))
Th