An Italian Takeaway is asking you to write a computer program to facilitate the ordering process and automatically calculate the total cost of an order.
They have stored their menu and all prices into a text file with the following information:
food-menu.txtWhen a customer order food, they give the lists of codes they would like order. For instance a customer could order the following: S4,P3,P7,X2,D4,C1,W2
Your program should allow the customer to order as many options from the menu as they need. For each option, it should lookup the price in the text file provided. It should then calculate and output the total cost of the order.
To complete this challenge you will need to read more about how to read through a CSV file.
Complete the Code
Testing
Once you have completed the code check that it produces the expected output by performing the following tests:
| Test # | Input Values | Expected Output | Actual Output |
| #1 | S4,P3,P7 | £28.89 | |
| #2 | P10,S1 | £16.00 | |
| #3 | P4,D2,C2 | £19.30 |
Extension Task
Add some input validation routines to your code so that the customer can only enter a valid code from the menu.
Video Tutorial / Solution

Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area
A cinema has created a booking system for their main theatre which consists of 48 seats, organised in 6 rows of 8 seats.

For this challenge we will create a variant of the game of Top Trumps using 9 cards, one for each of planet of our Solar System.
Since the establishment of the United States of America, in 1789, 45 people have served as president, the first one being George Washington.

Let’s consider an online Bakery that specialises in selling Birthday Cakes online. The owner of the bakery has estimated all the costs involved and grouped them into two categories:
We have listed all the costs of our online bakery, both fixed and variable into a text file.
Curling is a sport in which players slide stones on a sheet of ice towards a target area which is segmented into four concentric circles. Two teams, each with four players, take turns sliding heavy, polished granite stones, also called rocks, across the ice curling sheet towards the house, a circular target marked on the ice. Each team has eight stones. The purpose is to accumulate the highest score for a game; points are scored for the stones resting closest to the centre of the house at the conclusion of each end, which is completed when both teams have thrown all of their stones. A game usually consists of eight or ten ends.











