Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created August 12, 2020 19:47
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 codecademydev/a2fcd893334079fbbfb6c6916f015070 to your computer and use it in GitHub Desktop.
Save codecademydev/a2fcd893334079fbbfb6c6916f015070 to your computer and use it in GitHub Desktop.
Codecademy export
train_mass = 22680
train_acceleration = 10
train_distance = 100
bomb_mass = 1
def f_to_c(f_temp):
c_temp = (f_temp - 32) * 5/9
return c_temp
f100_in_celcius = f_to_c(100)
def c_to_f(c_temp):
f_temp = c_temp * (9/5) + 32
return f_temp
c0_int_fahrenheit = c_to_f(0)
def get_force(mass, acceleration):
force = mass * acceleration
return force
train_force = get_force(train_mass, train_acceleration)
print("The GE train supplies " + train_force + " Newtons of force."
def get_energy(mass, c = 3*10**8)
return mass * c**2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment