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
#2
Welcome!

Where do you need help? Show us what you did so far. Put your code between code tags.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
Honestly i have no idea where to even start
Reply
#4
We are willing to help but we won't write it for you.

Make a try.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  loops in combination with lists Juru 4 2,811 May-07-2020, 02:58 PM
Last Post: Marbelous
  Nested loops, lists and if statements Liquid_Ocelot 10 8,933 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