Read through this page and in Python, create the program that is asked for. Pay close attention to what is being asked and the success criteria.
We recommend planning the program before you start coding it, ask yourself these questions:
- How will your program be structured?
- What variables will be used and what will you call them?
- What code or concepts will you need to use?
Task:
Create a program that does the following:
- Welcomes the user to the Fireworks program
- Asks the user to input the distance that a firework travelled
- Asks the user to input the amount of time that the firework travelled for
- The program will then show the user the speed of the firework
Remember:
- You will need to ensure that your user inputs the correct measurements i.e are they inputting cm or metres?
- You will need to calculate the speed correctly using the distance and the time
- You will need to output the speed using the correct units
Challenge:
- Create a menu system that asks the user what they would like to calculate, speed, time or distance and calculate the correct value based on what the user has selected
- Put your program into subroutines or functions
- Allow the user to input different units of measurement for example cm or metres, seconds, or minutes
- The program allows the user to input more units if they want to
Success Criteria:
- The correct mathematical formulae is used
- The user is asked for the correct units of measurements
- The correct answer is given by the program