Python Forum
Please Help with lists and loops
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please Help with lists and loops
#1
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.
Reply


Messages In This Thread
Please Help with lists and loops - by EthanA - Oct-27-2018, 06:11 AM
RE: Please Help with lists and loops - by wavic - Oct-27-2018, 06:25 AM
RE: Please Help with lists and loops - by EthanA - Oct-27-2018, 06:56 AM
RE: Please Help with lists and loops - by wavic - Oct-27-2018, 08:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  loops in combination with lists Juru 4 2,906 May-07-2020, 02:58 PM
Last Post: Marbelous
  Nested loops, lists and if statements Liquid_Ocelot 10 9,177 Apr-23-2017, 02:02 PM
Last Post: Mekire

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020