Question: Can someone help me write a menu program using a separate program file to call the files already made, using python idle? I know we

Can someone help me write a menu program using a separate program file to call the files already made, using python idle? I know we have to import, but idk how to continue it: I'll put my imports below also

from add_coffee_record import add_coffee from delete_coffee_record import del_coffee from modify_coffee_records import mod_coffee from search_coffee_records import search from show_coffee_records import show

What you like to do press a number 1. Add an Element 2. Delete an Element 3. Modify Elements 4. Search Elements 5. Show Elements 6. Exit

Below are screen shots of every program in the files + the file folder

Can someone help me write a menu program using a separate program

file to call the files already made, using python idle? I know

we have to import, but idk how to continue it: I'll put

my imports below also from add_coffee_record import add_coffee from delete_coffee_record import del_coffee

from modify_coffee_records import mod_coffee from search_coffee_records import search from show_coffee_records import show

Inside Text File

What you like to do press a number 1. Add an Element

Inside the folder

2. Delete an Element 3. Modify Elements 4. Search Elements 5. Show

This program adds coffee inventory records to # the coffee.txt file. def add_coffee): # Create a variable to control the loop. another-y coffee fileopen ('coffee.txt, 'a) while another-y or another-Y. # Open the coffee.txt file in append mode. # Add records to the file # Get the coffee record data print (Ent descr input ( Description: ) ter the following coffee data) int input 'Quantity ( in pounds) # Append the data to the file. coffee file.write ( descr + nn) coffee_file.write( str ( qty) +In) # Determine whether the user wants to add # another record to the file. print ("Do you want to add another record?) another input ( = yes, anything else = no: ) # Close the file coffee_file.close ) print ("Data appended to coffee.txt.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!