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
Inside Text File
Inside the folder
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
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