Skip to content

Instantly share code, notes, and snippets.

@drew2a
Last active December 9, 2020 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drew2a/995b65b0ddd8b51fac38b86effc32646 to your computer and use it in GitHub Desktop.
Save drew2a/995b65b0ddd8b51fac38b86effc32646 to your computer and use it in GitHub Desktop.
def kilo(value):
return f'{value / 1000:.1f}kN'
def fall_force(m, fall_factor, elongation_factor=0.3):
return (9.8 * 2 * m * fall_factor) / elongation_factor
print(kilo(fall_force(80, 2))) # 10.5kN
print(kilo(fall_force(80, 1.7))) # 8.9kN
print(kilo(fall_force(80, 1))) # 5.2kN
print(kilo(fall_force(80, 0.3))) # 1.6kN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment