Lesson Objectives
- identify the Inputs, Processes and Outputs of a simple program- document the planning by creating a flowchart for the program
- use programming skills to create a simple program
Starter
Step One: Write a simple program to calculate the cost per person of a £100 meal. It should ask the user for the number of people dining. Your program should then calculate the cost of the meal per person and print what each person needs to pay.
Step Two: Rather than setting the meal cost to £100, your program should ask the user for the total cost of the meal AND how many people were dining. It should then calculate the cost of the meal per person.
Step Three:: Your diners would like to pay a 15% tip. Your program should ask the user for the total cost of the meal AND how many people were dining. It should then calculate a 15% tip and the new total cost of the meal per person.
Step Four:: Rather than setting the tip to 15%, your program should ask your user what percentage of tip your diners would like to pay. Your program should then ask the user for the total cost of the meal, including tip AND how many people were dining. It should then calculate the total cost of the meal per person, including tip.
Task
Identify the Inputs, Processes and Outputs for this problem, don't forget to name your variables
Main
Red Task:1. Create a flowchart using draw.io to plan your solution
2. Build your solution in Python
Orange Task:
1. Test your solution using a variety of data - floats, text, integers
2. Use a blank Python Challenges document - HERE - to evidence your work
Green Task
1. Research how you could improve your program to check the user has not entered text by mistake, instead of numbers?
2. Include this in your program
No comments:
Post a Comment