Question: 1 . c You have been asked to help a local cycle shop with a problem with their software. When you investigate you discover that

1.c You have been asked to help a local cycle shop with a problem with their software. When you investigate you discover that the functions needed to support the program seem to be missing. Read the program and documentation below and then answer the following questions.Documentation
\table[[Leg measurement (cm),Wheel Size],[24,Too short (return -1)],[24,10],[31,12],[38,14],[>48,Too tall (return -1)]]
Gear ratios are calculated by dividing the number of teeth on the drive gear (input teeth) by the number of teeth on the driven gear (output teeth).
Shifting up a gear means doubling the number of teeth on the drive gear and halving the number of teeth on the driven gear.
i. Write the function calculate_wheel_size (). You should make sure to include a suitable function header and return the correct value.
[3 Marks]
ii. Write the function calculate_gear_ratio (). You should make sure to include a suitable function header and return the correct value.
[3 Marks]
iii. Write the function shift_up (). You should make sure to include a suitable function header and return the correct values.
[3 Marks]
1.d
Professional software developers apply a set of style guidelines when writing their code in order to make their code easier to maintain, read and share with others. The following code snippet has been written by a poor programmer:i. Find and list four stylistic faults in this code.ii. What is the code doing ?[4 marks][2 marks][Total 25 Marks]
 1.c You have been asked to help a local cycle shop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!