Hi Rafael
You are appending quit to the list, before checking to see if quit has been
typed. You could move the "if Statement" up in the code and add an else
statement, so Quit is not appended to the list first thing.
while True:
activity = input(prompt)
if activity == "quit":
pr
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