Sep-09-2019, 08:36 PM
(Sep-09-2019, 08:25 PM)ichabod801 Wrote: You are keeping your variables separate enough. This is an outline of what your code should look like for both problems:
data = [] while True: next_datum = input('What is the next whatever? ') if next_datum == stop_value: break data.append(next_datum) print(data)next_datum is what they just entered. data is a list of everything valid that they entered. stop_value is whatever response stops the loop.
For the one with numbers, you want to look at the int() function to convert strings to integers.
Ok, I see, I will try and recode it following your suggested code outline, thanks again so much for your help I do appreciate it :)