Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NOTE : Is learning Python programming (currently on chapter 7) with the following textbook: Book Starting Out With Python 3rd Edition by Gaddis
NOTE: Is learning "Python programming" (currently on chapter 7) with the following textbook:
Book "Starting Out With Python" 3rd Edition by Gaddis
Project Planning In this lab, you will create an utility program that allows the user to track projects they want to do and output shopping lists to get all of the materials required for the projects. Your Program Your program should be a menu driven program. You should have the following functions print menu: takes no parameters and does not return anything. Just prints out the following menu: 1. Add Project 2. Print Shopping List 3. Quit get-projectid: takes two parameters, a list of project names and a project to search for. Returns the index of the project. saveshopping list : takes three parameters: a string and two lists. The string should be the name of the project. The first list should be a list of strings containing the materials needed for the project. The second list should be a list of floats containing the amount of each material needed. The function should write the information to a file named shoppingList.txt. The file should have the following format: Project Name Material 1 .... amount _needed Material 2 .... amount needed For example, if you were to call the function like this: save shopping list ("Crochet Elephant ', ' yarn' ', ''crochet hook'', ''buttons' ], [1, 1, 2]), then the output file would look like this: Crochet Elephant yarn .... 1 crochet hook .... 1 buttons get materials: Takes no parameters. Returns a list of strings. It should ask the user for all of the materials needed for a project. It should stop when the user enters quit It should return a list containing all of the strings gotten from the userStep 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