Question
Prompt the user to enter simple strings. Keep asking the user for a string until the user enters the word 'quit'. 2. Make a list
Prompt the user to enter simple strings. Keep asking the user for a string until the user enters the word 'quit'.
2. Make a list from the values entered
3. Print out the completed list
4. Prompt the user for an additional string
5. Add the new string to the list and print it
6. Make a tuple from the list and print it
The outcome should look like:
Enter a string: what's
Enter a string: the
Enter a string: deal
Enter a string: with
Enter a string: airline food
Enter a string: quit
["what's" , 'the' , 'deal' , 'with' , 'airline food' ]
Enter an additional string: ?!
["what's" , 'the' , 'deal' , 'with' , 'airline food' , '?!]
("what's" , 'the' , 'deal' , 'with' , 'airline food' )
Should Follow:
30 points: Loop asking for user strings
• 10 points: make a list
• 10 points: Print the list
• 5 points: Ask the user for another string
• 10 Points: Add the new string to the list and print
• 20 Points: Convert list to tuple and print
• 5 points: Your python program runs without errors.
• 5 points: Your python file includes comments, describing your work.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
You can create a Python program to achieve the desired outcome as follows Initialize an empty list m...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started