Worked example · MFL · Year 7

Checking a Spanish Cafe Menu and Online Order Form

DCF: Data and computational thinking → Problem-solving and modelling · LNF: Numeracy → Understanding the number system helps us to represent and compare relationships between numbers and quantities → Financial literacy

What this is

A complete Year 7 answer key and model response annotated against the success criteria. Key finding in Step 2: Baskets 3 and 4 expose the OR vs AND logic bug. Show or read from this sheet after pupils have completed the worksheet.

Step 1: translate the 8 menu items and record their prices

Spanish menu item English meaning Category Price (€)
1. un bocadillo de jamón a ham sandwich Sandwich (Bocadillo) €4.50
2. un zumo de naranja an orange juice Drink (Bebida) €2.50
3. un bocadillo de queso a cheese sandwich Sandwich (Bocadillo) €4.00
4. un bocadillo de tortilla a Spanish omelette sandwich Sandwich (Bocadillo) €4.50
5. un agua mineral a bottle of mineral water Drink (Bebida) €1.50
6. una limonada a lemonade Drink (Bebida) €2.00
7. un helado de vainilla a vanilla ice cream Dessert (Postre) €3.00
8. churros con chocolate churros with hot chocolate Dessert (Postre) €3.50

All 8 Spanish items are translated accurately with their category and price. Evidences criterion 1.

Step 2: trace 5 customer baskets through the discount rules

Customer basket Full price (€) Intended total with AND (€) Buggy website total with OR (€) Right price or Bug?
Basket 1: ham sandwich (€4.50) + orange juice (€2.50) €7.00 €5.00 €5.00 Right price (has both)
Basket 2: cheese sandwich (€4.00) + mineral water (€1.50) + vanilla ice cream (€3.00) €8.50 €6.50 €6.50 Right price (has both)
Basket 3: omelette sandwich only (€4.50) €4.50 €4.50 €2.50 Bug! (€2.00 off without a drink)
Basket 4: 1 mineral water only (€1.50) €1.50 €1.50 −€0.50 (or €0.00) Bug! (€2.00 off a €1.50 drink)
Basket 5: churros (€3.50) + vanilla ice cream (€3.00) €6.50 €6.50 €6.50 Right price (neither item)

Shows why testing only normal meal-deal baskets (Baskets 1 and 2) or dessert-only baskets (Basket 5) misses the bug; single-category test cases (Baskets 3 and 4) are essential to expose it. Evidences criterion 2.

Step 3: explain and fix the logic bug

(a) Why the bug happened: The programmer used the logical operator OR instead of AND in Step B. Because a bottle of mineral water counts as at least 1 bebida, the condition at least 1 bocadillo OR at least 1 bebida evaluates to YES even when there is no sandwich in the basket. Subtracting €2.00 from €1.50 gives a total of −€0.50, meaning the customer gets the water for free and the cafe loses money.

(b) Corrected Step B (Decision box):
IF (number of bocadillos ≥ 1) AND (number of bebidas ≥ 1) THEN Final Total = Full Price − €2.00, ELSE Final Total = Full Price.

Clearly explains the difference between OR and AND and rewrites the condition unambiguously. Evidences criterion 3.

Step 4: polite bilingual confirmation message for Basket 2

Spanish message: ¡Hola! Muchas gracias por tu pedido en la Cafetería El Faro. Tu pedido es: un bocadillo de queso (4,00 €), un agua mineral (1,50 €) y un helado de vainilla (3,00 €). El precio sin descuento es de 8,50 €. Con la oferta del día, tienes un descuento de dos euros (2,00 €). El precio total a pagar es de 6,50 €. ¡Buen provecho y hasta pronto!

English translation: Hello! Thank you very much for your order at Cafeteria El Faro. Your order is: a cheese sandwich (€4.00), a mineral water (€1.50) and a vanilla ice cream (€3.00). The price without discount is €8.50. With the deal of the day, you have a discount of two euros (€2.00). The total price to pay is €6.50. Enjoy your meal and see you soon!

Polite, accurate Spanish using the menu vocabulary, correct gender articles (un bocadillo, un agua mineral, un helado) and exact euro figures. Evidences criterion 4.

If you finish early: answers

Family basket calculation:
2 ham sandwiches (2 × €4.50 = €9.00) + 1 cheese sandwich (€4.00) + 2 lemonades (2 × €2.00 = €4.00) + 1 orange juice (€2.50) + 2 portions of churros (2 × €3.50 = €7.00).
Full price: €9.00 + €4.00 + €4.00 + €2.50 + €7.00 = €26.50.
Meal deal pairs: 3 sandwiches and 3 drinks make 3 complete pairs → 3 × €2.00 = €6.00 discount.
Final bill: €26.50 − €6.00 = €20.50.

Spanish confirmation: ¡Hola! Tu pedido es: dos bocadillos de jamón, un bocadillo de queso, dos limonadas, un zumo de naranja y dos raciones de churros con chocolate. El precio sin descuento es de 26,50 €. Con tres ofertas del día, tienes un descuento de 6,00 €. El precio total a pagar es de 20,50 €. ¡Muchas gracias!

Why this response is secure