Answered step by step
Verified Expert Solution
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: listomatic
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 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
instance of horse appended to Iist
Helcome, YOUR MME GOES HINAE Look at all the anfinels Gitgo:t "Eat', 'harse' enter the neme of an anitilel: cat
instance of cat removes from Ist
Welcome, YOUR NAME GOES HERE Look at all the aulimis goat "cot', 'harEe' enter the name of an animal: cat:
instance of cat removed from st
Helcome, YOUR NAME GOES HERE Look at a the animals goat 'horse'
enter the nesse of an aninals s entered empty string
horse popped from ist
Helcome, YOUR NMME GOES HERE Look at all the animuls goat
enter the name of an anjimel: c entered empty string
goat popped from list
cenorthual
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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