Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lists Homework
#1
Write a function named get_strings to ask the user for a series of strings and to return a list where each string is an item in the list. The user indicates that they are finished entering items by entering empty string''for the last prompt.Save the functions in a PyDev library module named a7_functions.py Write a program named q1.py to test the function.
The output of the function is printed in one line.
As Sample run,
Enter item:1
Enter item: 30
Enter item:40
Enter item:50
Enter item:<--enter key with no item terminates data entry
['1', '30', '40', '50']
Reply
#2
Ok, that's your assignment, show what you have done so far, and where you are having a problem.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Working with lists homework Otaku2 7 5,073 Jun-06-2018, 03:40 AM
Last Post: hf8bm
  Working with lists homework (2) codellino 7 4,490 Feb-28-2018, 11:23 AM
Last Post: buran

Forum Jump:

User Panel Messages

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