Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program: list - o - matic This progrem tekes string input and chsaks if thet string is in a list of strings if string is

Program: list-o-matic
This progrem tekes string input and chsaks if thet string is in a list of strings
if string is in the list it removes the first instrange from list
if string is not in the list the input ges appended to the list
if the string is empty then the leat item is poppod from the list
if the lit beroanes emply the pragram ends
if the user enters "quil" then the program ends
program has 2 parts
program filow which can be modlied to ask for a specilic type of item. This is the progremmers choige, Add a list of fish, trees, book, movies, songs- your choice
listomalic Funcion which trekes arduments of a string and a list. The function modilies the list and returns a megeage as seen below.
I] initielre a llst with severel strings at the beginning of the program flow and follow the flow dhere and output exemples excomple ingoutroutpurt enter the nalce of an anamal: horse
1 instance of horse appended to Iist
Helcome, [YOUR MME GOES HINAE]. Look at all the anfinels ['Git','go:t', "Eat', 'harse'] enter the neme of an anitilel: cat
1 instance of cat removes from I1st
Welcome, [YOUR NAME GOES HERE]]. Look at all the aulimis ['goat', "cot', 'harEe'] enter the name of an animal: cat:
1 instance of cat removed from 11st
Helcome, [YOUR NAME GOES HERE], Look at a11 the animals ['goat', 'horse']
enter the nesse of an aninals (s-- entered empty string)
horse popped from 1ist
Helcome, [YOUR NMME GOES HERE]. Lo.ok at all the animuls ['goat'1]
enter the name of an anjimel: (c-- entered empty string)
goat popped from list
cenorthual
image text in transcribed

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

Step: 3

blur-text-image

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

Database Systems On GPUs In Databases

Authors: Johns Paul ,Shengliang Lu ,Bingsheng He

1st Edition

1680838482, 978-1680838480

More Books

Students also viewed these Databases questions