{ "metadata": { "kernelspec": { "name": "python", "display_name": "Python (Pyodide)", "language": "python" }, "language_info": { "codemirror_mode": { "name": "python", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8" } }, "nbformat_minor": 5, "nbformat": 4, "cells": [ { "id": "f8e4f675-bf4e-48c1-8bc3-974524499e46", "cell_type": "markdown", "source": "
Each menu item below has:
\nYour teacher will demonstrate how to access items from a record (a list within a list):
\nIt will look like this
\nAllergy advice: bread contains gluten\n
Following this you will learn how to output parts of each record to display each allergen
\nTo do this, you will use a for i in range() sequence
\nAllergy advice: bread contains gluten\n
Allergy advice: yogurt contains lactose\n
Allergy advice: nutella contains hazelnut\n
Allergy advice: cheese contains dairy\n
Allergy advice: pasta contains gluten\n
You will now learn (with your teacher) how to use a for i in range(): loop to output each item in the list as part of this statement.
\n\nShakespeare is a topic in the English curriculum\nAlgebra is a topic in the Maths curriculum\nPoetry analysis is a topic in the English curriculum\nSimultaneous equations is a topic in the Maths curriculum\nRivers and flooding is a topic in the Geography curriculum\nPopulation growth is a topic in the Geography curriculum\n\n
Create a program that will:
\nIt will work like this
\n\nEnter an allergen: gluten\nYou should avoid the following:\nbread\npasta\n\n
Each student record contains:
\nThe program should ask for a grade and output students with that grade e.g.
\nName: Maya | Mark: 51 | Grade: 8\n
Name: Priya | Mark: 52 | Grade: 8\n
Name: Emily | Mark: 50 | Grade: 8\n
Name: Zara | Mark: 54 | Grade: 8\n
Modify your program so the user can search for students:
\nCount how many students achieved each grade.
\nHints:
\n