Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Assistance
#2
Indeed Jack, when you are just printing the items there is not much you can do with it. Before you design your program you should design your data model. Put the dishes and the prices in a list. Then that list will be the center of your program where all the functions work with.
menuitems = [['Gang Gai', 10.00],
             ['Pad Thai',  8.75]]
Then you make a function to display the menu items like you did. Let the customer choose one of the items and then you can easily fetch the price from de menuitems list.
Try it.
Reply


Messages In This Thread
Need Assistance - by Jack_Daniels - May-16-2020, 05:35 AM
RE: Need Assistance - by ibreeden - May-16-2020, 12:12 PM
RE: Need Assistance - by Jack_Daniels - May-16-2020, 09:57 PM
RE: Need Assistance - by Jack_Daniels - May-16-2020, 10:59 PM
RE: Need Assistance - by ibreeden - May-17-2020, 08:58 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020