This is an individual assessment competency hurdle task. If you have questions or need help, ask privately on the forums. Students caught working together will be awarded an automatic fail.
Write a python program to calculate the penalty for speeding in Victorville using the conditions in the table provided below. Note that the conditions in the table shown are not in the correct sequence - conditional statements must be written in the right order, so make sure you read all of the conditions and then decide on the most appropriate order for them.
Your program will need to contain two sections, a main() function and a determine_overspeed_penalties() function.
The main() function has no parameters and contains the logic as follows:
At any time, if the user hits CTRL+C (Keyboard Interrupt), the program should end after printing 'Exiting program now'.
The determine_overspeed_penalties() function has the three parameters vehType, roadSpeed, speedLimit:
The function should contain the logic as follows:
| Exceeding the speed limit | Penalty | Demerit points | Automatic licence suspension |
|---|---|---|---|
| By less than 10 km/h | $247.00 | 1 | - |
| 10 km/h to under 25 km/h | $395.00 | 3 | - |
| 25 km/h to under 30 km/h | $543.00 | - | 3 months |
| 30 km/h to under 35 km/h | $642.00 | - | 3 months |
| 35 km/h to under 40 km/h | $741.00 | - | 6 months |
| 40 km/h to under 45 km/h | $840.00 | - | 6 months |
| By 45 km/h or more | $988.00 | - | 12 months |
| 20 km/h to under 25 km/h (in a 110 km/h zone) | $395.00 | - | 3 months |
| Exceeding the speed limit | Penalty | Demerit points | Automatic licence suspension |
|---|---|---|---|
| By less than 10 km/h | $324 | 1 | - |
| 10 km/h to under 15 km/h | $509 | 3 | - |
| 15 km/h to under 25 km/h | $740 | 3 | - |
| 25 km/h to under 30 km/h | $1,017 | - | 3 months |
| 30 km/h to under 35 km/h | $1,294 | - | 3 months |
| 35 km/h to under 40 km/h | $1,572 | - | 6 months |
| 40 km/h to under 45 km/h | $1,849 | - | 6 months |
| By 45 km/h or more | $2,127 | - | 12 months |
| 20 km/h to under 24 km/h (only in a 110 km/h zone) | $740 | - | 3 months |
I have a sorted list implemented using linked nodes with n elements. I want to delete a target element. What is the worst-case time complexity of this?
Una empresa de biotecnología desarrolla un producto innovador, pero la inversión inicial es muy alta. ¿Qué estrategia podría mejorar su viabilidad financiera?
Un estudio de viabilidad de un proyecto de infraestructura detecta problemas de acceso a recursos hídricos. ¿Cómo podría abordarse este desafío?
Un proyecto tecnológico tiene una alta inversión en I+D, pero enfrenta una rápida obsolescencia. ¿Cuál sería la mejor estrategia para mejorar su viabilidad?
¿Qué es un estudio de mercado dentro del análisis de viabilidad?
Una empresa de construcción enfrenta un alza inesperada en costos de materiales.
¿Cual alternativa para analizar se debe priorizar ?
Una empresa de software evalúa si es viable internacionalizar su producto. ¿Cuál es un factor clave en la viabilidad comercial?
Un gobierno evalúa la viabilidad de un nuevo sistema de transporte público. ¿Cuál debería ser su principal enfoque para garantizar sostenibilidad?
¿Qué factor influye en la viabilidad ambiental de un proyecto?