0
In python, how do I save an appended list in a loop?
I have a CS assignment due that asks me to "design a program that asks the user to enter a series of numbers. the user should enter -99 to signal the end of the series. after all the numbers have been entered, the program should display the largest and smallest numbers entered. turn in: source code with IPO comments structure chart screen shot of testing." I figured out most of it, but I can't get the values entered to stay in the list. is there a trick I don't know?
2 Answers
+ 1
Well, if you're working with loops and lists ... at this point you should be aware what a variable does and can do.
So, that answers your saving question. My next question is, do you know how loops, and lists work?
Sure, I could easily write code for this in 30 seconds. But we're not going to do your assignment for you. Plus if you don't learn how it works, bigger assignments will cause you to be frustrated.
+ 1
I found my mistake, I put the empty list inside the loop which kept erasing it.