SlideShare a Scribd company logo
1 of 1
Download to read offline
Python
Create a function that displays a list of choices to the user to prompt them to add, remove,
display or exit.
Create a function with a parameter that accepts the users choice. This function will
contain a list of candy. Use a conditional structure to allow the following to happen based
on the users choice:
Add Prompt the user for a new candy item and add it to the list if it does not
currently exist.
Remove Prompt the user to enter a candy item from the list and remove it from
the list. If you cannot find the item, output to the user, Item not found.
Display Print the list of candy
Exit Closes the program.
Include a loop to allow the program to run until the user enters a 4.
If the user enters a value other than 1 4, output to the user, Invalid Option.
Run the code to display your output.
Submit the following:
Screenshot or attached .py or .ipynb of your complete code.
Screenshot of your output.

More Related Content

More from admin447081

On January 1 2021 Pembina Corporation a publicly traded c.pdf
On January 1 2021 Pembina Corporation a publicly traded c.pdfOn January 1 2021 Pembina Corporation a publicly traded c.pdf
On January 1 2021 Pembina Corporation a publicly traded c.pdfadmin447081
 
Multinational organisations MNOs operate their activities .pdf
Multinational organisations MNOs operate their activities .pdfMultinational organisations MNOs operate their activities .pdf
Multinational organisations MNOs operate their activities .pdfadmin447081
 
Las hembras de bonobo Pan paniscus pueden ir solas e int.pdf
Las hembras de bonobo Pan paniscus pueden ir solas e int.pdfLas hembras de bonobo Pan paniscus pueden ir solas e int.pdf
Las hembras de bonobo Pan paniscus pueden ir solas e int.pdfadmin447081
 
Hawthorne almalar aadakilerin nemini ortaya kard Birini.pdf
Hawthorne almalar aadakilerin nemini ortaya kard  Birini.pdfHawthorne almalar aadakilerin nemini ortaya kard  Birini.pdf
Hawthorne almalar aadakilerin nemini ortaya kard Birini.pdfadmin447081
 
a 5 points Prove that Y the vector of fitted values is.pdf
a 5 points Prove that Y the vector of fitted values is.pdfa 5 points Prove that Y the vector of fitted values is.pdf
a 5 points Prove that Y the vector of fitted values is.pdfadmin447081
 
6 If X1X2Xn constitute a random sample of size n from a.pdf
6 If X1X2Xn constitute a random sample of size n from a.pdf6 If X1X2Xn constitute a random sample of size n from a.pdf
6 If X1X2Xn constitute a random sample of size n from a.pdfadmin447081
 
1a Cul de los siguientes no es un ejemplo de un accionist.pdf
1a Cul de los siguientes no es un ejemplo de un accionist.pdf1a Cul de los siguientes no es un ejemplo de un accionist.pdf
1a Cul de los siguientes no es un ejemplo de un accionist.pdfadmin447081
 
DEF Company also has preferred stock outstanding that pays a.pdf
DEF Company also has preferred stock outstanding that pays a.pdfDEF Company also has preferred stock outstanding that pays a.pdf
DEF Company also has preferred stock outstanding that pays a.pdfadmin447081
 
4 Explain the usage of each tool that you identified above.pdf
4 Explain the usage of each tool that you identified above.pdf4 Explain the usage of each tool that you identified above.pdf
4 Explain the usage of each tool that you identified above.pdfadmin447081
 
CASO INTEGRATIVO 30 IKEA estilo escandinavo Detrs de l.pdf
CASO INTEGRATIVO 30  IKEA estilo escandinavo  Detrs de l.pdfCASO INTEGRATIVO 30  IKEA estilo escandinavo  Detrs de l.pdf
CASO INTEGRATIVO 30 IKEA estilo escandinavo Detrs de l.pdfadmin447081
 
1 a Cul es el nombre de la esfera que se encuentra en e.pdf
1  a Cul es el nombre de la esfera que se encuentra en e.pdf1  a Cul es el nombre de la esfera que se encuentra en e.pdf
1 a Cul es el nombre de la esfera que se encuentra en e.pdfadmin447081
 
According to US Census data 716 of Americans are age 21.pdf
According to US Census data 716 of Americans are age 21.pdfAccording to US Census data 716 of Americans are age 21.pdf
According to US Census data 716 of Americans are age 21.pdfadmin447081
 
1 Sosyal medya pazarlamasn SMM kullanmann avantajlar ile .pdf
1 Sosyal medya pazarlamasn SMM kullanmann avantajlar ile .pdf1 Sosyal medya pazarlamasn SMM kullanmann avantajlar ile .pdf
1 Sosyal medya pazarlamasn SMM kullanmann avantajlar ile .pdfadmin447081
 
10 points Let continuous variables X1Xk be independentl.pdf
10 points Let continuous variables X1Xk be independentl.pdf10 points Let continuous variables X1Xk be independentl.pdf
10 points Let continuous variables X1Xk be independentl.pdfadmin447081
 
1 Provide three examples of automatic data classifications .pdf
1 Provide three examples of automatic data classifications .pdf1 Provide three examples of automatic data classifications .pdf
1 Provide three examples of automatic data classifications .pdfadmin447081
 
Theodore E Lariat is a single taxpayer born on September 22.pdf
Theodore E Lariat is a single taxpayer born on September 22.pdfTheodore E Lariat is a single taxpayer born on September 22.pdf
Theodore E Lariat is a single taxpayer born on September 22.pdfadmin447081
 
Use C++ for all 1 bool mapContainsKeysarrayltintgt nu.pdf
Use C++ for all  1 bool mapContainsKeysarrayltintgt nu.pdfUse C++ for all  1 bool mapContainsKeysarrayltintgt nu.pdf
Use C++ for all 1 bool mapContainsKeysarrayltintgt nu.pdfadmin447081
 
This code i would want to work ssh compiling for the this ta.pdf
This code i would want to work ssh compiling for the this ta.pdfThis code i would want to work ssh compiling for the this ta.pdf
This code i would want to work ssh compiling for the this ta.pdfadmin447081
 
Stakeholder strategySocialresponsibility AFI strategy Vis.pdf
Stakeholder strategySocialresponsibility AFI strategy    Vis.pdfStakeholder strategySocialresponsibility AFI strategy    Vis.pdf
Stakeholder strategySocialresponsibility AFI strategy Vis.pdfadmin447081
 
Question 4 Let n2 be an integer and let G be the nn undire.pdf
Question 4 Let n2 be an integer and let G be the nn undire.pdfQuestion 4 Let n2 be an integer and let G be the nn undire.pdf
Question 4 Let n2 be an integer and let G be the nn undire.pdfadmin447081
 

More from admin447081 (20)

On January 1 2021 Pembina Corporation a publicly traded c.pdf
On January 1 2021 Pembina Corporation a publicly traded c.pdfOn January 1 2021 Pembina Corporation a publicly traded c.pdf
On January 1 2021 Pembina Corporation a publicly traded c.pdf
 
Multinational organisations MNOs operate their activities .pdf
Multinational organisations MNOs operate their activities .pdfMultinational organisations MNOs operate their activities .pdf
Multinational organisations MNOs operate their activities .pdf
 
Las hembras de bonobo Pan paniscus pueden ir solas e int.pdf
Las hembras de bonobo Pan paniscus pueden ir solas e int.pdfLas hembras de bonobo Pan paniscus pueden ir solas e int.pdf
Las hembras de bonobo Pan paniscus pueden ir solas e int.pdf
 
Hawthorne almalar aadakilerin nemini ortaya kard Birini.pdf
Hawthorne almalar aadakilerin nemini ortaya kard  Birini.pdfHawthorne almalar aadakilerin nemini ortaya kard  Birini.pdf
Hawthorne almalar aadakilerin nemini ortaya kard Birini.pdf
 
a 5 points Prove that Y the vector of fitted values is.pdf
a 5 points Prove that Y the vector of fitted values is.pdfa 5 points Prove that Y the vector of fitted values is.pdf
a 5 points Prove that Y the vector of fitted values is.pdf
 
6 If X1X2Xn constitute a random sample of size n from a.pdf
6 If X1X2Xn constitute a random sample of size n from a.pdf6 If X1X2Xn constitute a random sample of size n from a.pdf
6 If X1X2Xn constitute a random sample of size n from a.pdf
 
1a Cul de los siguientes no es un ejemplo de un accionist.pdf
1a Cul de los siguientes no es un ejemplo de un accionist.pdf1a Cul de los siguientes no es un ejemplo de un accionist.pdf
1a Cul de los siguientes no es un ejemplo de un accionist.pdf
 
DEF Company also has preferred stock outstanding that pays a.pdf
DEF Company also has preferred stock outstanding that pays a.pdfDEF Company also has preferred stock outstanding that pays a.pdf
DEF Company also has preferred stock outstanding that pays a.pdf
 
4 Explain the usage of each tool that you identified above.pdf
4 Explain the usage of each tool that you identified above.pdf4 Explain the usage of each tool that you identified above.pdf
4 Explain the usage of each tool that you identified above.pdf
 
CASO INTEGRATIVO 30 IKEA estilo escandinavo Detrs de l.pdf
CASO INTEGRATIVO 30  IKEA estilo escandinavo  Detrs de l.pdfCASO INTEGRATIVO 30  IKEA estilo escandinavo  Detrs de l.pdf
CASO INTEGRATIVO 30 IKEA estilo escandinavo Detrs de l.pdf
 
1 a Cul es el nombre de la esfera que se encuentra en e.pdf
1  a Cul es el nombre de la esfera que se encuentra en e.pdf1  a Cul es el nombre de la esfera que se encuentra en e.pdf
1 a Cul es el nombre de la esfera que se encuentra en e.pdf
 
According to US Census data 716 of Americans are age 21.pdf
According to US Census data 716 of Americans are age 21.pdfAccording to US Census data 716 of Americans are age 21.pdf
According to US Census data 716 of Americans are age 21.pdf
 
1 Sosyal medya pazarlamasn SMM kullanmann avantajlar ile .pdf
1 Sosyal medya pazarlamasn SMM kullanmann avantajlar ile .pdf1 Sosyal medya pazarlamasn SMM kullanmann avantajlar ile .pdf
1 Sosyal medya pazarlamasn SMM kullanmann avantajlar ile .pdf
 
10 points Let continuous variables X1Xk be independentl.pdf
10 points Let continuous variables X1Xk be independentl.pdf10 points Let continuous variables X1Xk be independentl.pdf
10 points Let continuous variables X1Xk be independentl.pdf
 
1 Provide three examples of automatic data classifications .pdf
1 Provide three examples of automatic data classifications .pdf1 Provide three examples of automatic data classifications .pdf
1 Provide three examples of automatic data classifications .pdf
 
Theodore E Lariat is a single taxpayer born on September 22.pdf
Theodore E Lariat is a single taxpayer born on September 22.pdfTheodore E Lariat is a single taxpayer born on September 22.pdf
Theodore E Lariat is a single taxpayer born on September 22.pdf
 
Use C++ for all 1 bool mapContainsKeysarrayltintgt nu.pdf
Use C++ for all  1 bool mapContainsKeysarrayltintgt nu.pdfUse C++ for all  1 bool mapContainsKeysarrayltintgt nu.pdf
Use C++ for all 1 bool mapContainsKeysarrayltintgt nu.pdf
 
This code i would want to work ssh compiling for the this ta.pdf
This code i would want to work ssh compiling for the this ta.pdfThis code i would want to work ssh compiling for the this ta.pdf
This code i would want to work ssh compiling for the this ta.pdf
 
Stakeholder strategySocialresponsibility AFI strategy Vis.pdf
Stakeholder strategySocialresponsibility AFI strategy    Vis.pdfStakeholder strategySocialresponsibility AFI strategy    Vis.pdf
Stakeholder strategySocialresponsibility AFI strategy Vis.pdf
 
Question 4 Let n2 be an integer and let G be the nn undire.pdf
Question 4 Let n2 be an integer and let G be the nn undire.pdfQuestion 4 Let n2 be an integer and let G be the nn undire.pdf
Question 4 Let n2 be an integer and let G be the nn undire.pdf
 

Recently uploaded

TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
Climbers and Creepers used in landscaping
Climbers and Creepers used in landscapingClimbers and Creepers used in landscaping
Climbers and Creepers used in landscapingDr. M. Kumaresan Hort.
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxMohamed Rizk Khodair
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint23600690
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...Nguyen Thanh Tu Collection
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 

Recently uploaded (20)

TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
Climbers and Creepers used in landscaping
Climbers and Creepers used in landscapingClimbers and Creepers used in landscaping
Climbers and Creepers used in landscaping
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 

Python Create a function that displays a list of choices to .pdf

  • 1. Python Create a function that displays a list of choices to the user to prompt them to add, remove, display or exit. Create a function with a parameter that accepts the users choice. This function will contain a list of candy. Use a conditional structure to allow the following to happen based on the users choice: Add Prompt the user for a new candy item and add it to the list if it does not currently exist. Remove Prompt the user to enter a candy item from the list and remove it from the list. If you cannot find the item, output to the user, Item not found. Display Print the list of candy Exit Closes the program. Include a loop to allow the program to run until the user enters a 4. If the user enters a value other than 1 4, output to the user, Invalid Option. Run the code to display your output. Submit the following: Screenshot or attached .py or .ipynb of your complete code. Screenshot of your output.