![]() |
Please Help with lists and loops - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: Please Help with lists and loops (/thread-13690.html) |
Please Help with lists and loops - EthanA - Oct-27-2018 I'm having trouble with this homework and need help very desperately, been really confused on loops and lists. Write a function that returns a list of numbers, make_list(). In the function, construct an empty list and then prompt the user to enter a number, -999 to quit. You will need a loop. If the user enters any number other than -999, add it to the list. Once the user enters -999, quit the loop and return the list. (Do not include -999 in the list.) Write another function that prints the elements of a list separated by a space ( print_elems(user_list) ). Call the functions appropriately. RE: Please Help with lists and loops - wavic - Oct-27-2018 Welcome! Where do you need help? Show us what you did so far. Put your code between code tags. RE: Please Help with lists and loops - EthanA - Oct-27-2018 Honestly i have no idea where to even start RE: Please Help with lists and loops - wavic - Oct-27-2018 We are willing to help but we won't write it for you. Make a try. |