Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

nput loop - 30 points Creating a list - 10 points Print out the list - 10 points Prompt user for new string - 10

nput loop - 30 points Creating a list - 10 points Print out the list - 10 points Prompt user for new string - 10 points Add new string to list - 10 points Make new tuple and print - 20 points Functional Program - 10 points This program will be an exercise in using loops. In this program, you will create some loops to allow a variable number of inputs. You will be modifying the lab from last week. Here are the requirements for the program: Write a Python program that will do the following:

1. Prompt the user to enter a series of strings. Keep asking for strings until the user enters a q.

2. Create 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

6. Make a new tuple from the list

7. Print the new tuple Example

Output (User input in bold)

Please enter a string (q to quit): Gopher

Please enter a string (q to quit): Games

Please enter a string (q to quit): q

The list is [ Gopher, Games ]

Please enter an additional string: Rock

The new tuple is (Gopher, Games, Rock)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions