Objective 2: Determine the output gears required to meet a given gear ratio. Define a function find_gear_config () which completes the following: → The function should accept two arguments: 1. Gear Ratio (of type float) 2. List of gear number of teeth values → This list comprises all of the possible output gear sizes the different teams have in their gearing mechanism design → You will search through this list to determine the output gear sizes (for both the first level and second level) based on a total gear ratio → Determine the output gears for the First Level (FL_output) and Second Level (SL_output) such that the calculated gear ratio (rounded to 3 decimal places) equals the input gear ratio The input gear list contains the possible number of teeth for output gears It is possible that both output gears have the same number of teeth Assume a 2-level gearing mechanism Assume the input gears for both levels (FL input and SL_input) have 12 teeth FLoutput SLoutput gear ratiocalculated FLinput SLinput 37 DP-X IBEHS 1P10 - Project X: This is Getting Out of Hand » The function should return a list of four items The list should contain the correct configuration of gears in this order: FL_input (i.e. 12), FL_output, SL_input (i.e. 12), SL_output If there is no viable combination to satisfy the gear ratio, the function should return None
Hi. This is with Python btw. I keep messaging my TA's but I guess they are busy. I'm looking for any tips on how to solve this. I don't understand how to get the code to find the number of teeth (size) of an output gear based on a gear ratio. They gave the gear ratio formula, so I thought you could replace the gear ratio from the gear ratio list into the equation but idk what else to do.
Below is what I was given and have so far and I attached two files. Thanks for any help!
Gear Ratios:
4.444444444
4.666666667
5
5.333333333
5.444444444
5.555555556
6.222222222
6.666666667
7
7.777777778
Gear List:
12
14
20
24
28
32
36
40
code iIhave so far:
def calc_GR(gear_list1, gear_list2):
ratio1 = gear_list1[-1] / gear_list1[0]
ratio2 = gear_list2[-1] / gear_list2[0]
gear_ratio = ratio1 * ratio2
return gear_ratio
def find_gear_config(float(gear_ratio),gear_list):
new_list=[]
SL_input=12
FL_input=12
gear_ratio_calc=(FL_output/FL_input)*(SL_output/SL_input)
if gear_ratio==gear_ratio_calc: #(round(gear_ratio_calc,2))
new_list.append(FL_input)
new_list.append(FL_output)
new_list.append(SL_input)
new_list.append(SL_output)
return new_list
![##Student ID: ()
ADD INDIVIDUAL OBJECTIVES HERE (e.g., objectivel (), objective2 (), etc.)
I
def find gear config (float (gear_ratio),gear_list):
new list=[]
SL_input=12
FL_input=12
gear_ratio_calc=(FL_output/FL_input)* (SL_output/SL_input)
if gear ratio==gear ratio calc:
(round (gear ratio calc,2))
new list. append (FL input)
new list.append (FL output)
new list.append (SL_input)
new_list.append (SL_output)
return new list](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fca6b5de9-d666-4be4-bec5-372f49facd74%2F0eab369c-e785-4476-8d7a-4794bea01a9e%2Fg0erdd4_processed.jpeg&w=3840&q=75)


Step by step
Solved in 4 steps









