Q.1
import math
def cosmic_gravities(mass,radius,constant):
G = 6.67e-11
if constant != G:
return "INCORRECT, >:)"
formula1 = (constant * mass)
formula2 = (radius)**2
main = formula1 / formula2
if constant == G:
return "YOU GOT IT RIGHT ,correct", main
Q.2
def race_with_light_or_a_fly(acceleration,s_light):
light = 300000000 #m/s
if s_light>acceleration:
return "Zap, Ill never let you go you fake programmer!", "P.S its
light and no"
one _meter = 1.057e-16 #LY
if s_light<acceleration:
return "yoyoyoyoyoyo!!!!, light loves you, you and light are going in blackhole"
print cosmic_gravities(40,0.1,6.67e-11)
print cosmic_gravities(1.99e3,5,6.67e-11)
print cosmic_gravities(11212,787,9e-11)
light = 300000000
print race_with_light_or_a_fly(5.7e6,light)
print race_with_light_or_a_fly(5.7e9,light)
Q.3
def escape_velocity(constant, mass, radius):
con = 6.67e-11 #Nm/kg
formulae = (2*constant*mass)/radius
if constant == con:
return "I wanna move it move it , correct", math.sqrt(formulae)/1000
if constant != con:
return "Im falling, im going down, incorrect", False
G = 6.67e-11
print escape_velocity(6.67e-11,79997977979,0.009)
print escape_velocity(6.67e-11,5.34e24,6.4e6)
print escape_velocity(7e8,5555,55555)
Collapse this postimport math
def cosmic_gravities(mass,radius,constant):
G = 6.67e-11
if constant != G:
return "INCORRECT, >:)"
formula1 = (constant * mass)
formula2 = (radius)**2
main = formula1 / formula2
if constant == G:
return "YOU GOT IT RIGHT ,correct", main
Q.2
def race_with_light_or_a_fly(acceleration,s_light):
light = 300000000 #m/s
if s_light>acceleration:
return "Zap, Ill never let you go you fake programmer!", "P.S its
light and no"
one _meter = 1.057e-16 #LY
if s_light<acceleration:
return "yoyoyoyoyoyo!!!!, light loves you, you and light are going in blackhole"
print cosmic_gravities(40,0.1,6.67e-11)
print cosmic_gravities(1.99e3,5,6.67e-11)
print cosmic_gravities(11212,787,9e-11)
light = 300000000
print race_with_light_or_a_fly(5.7e6,light)
print race_with_light_or_a_fly(5.7e9,light)
Q.3
def escape_velocity(constant, mass, radius):
con = 6.67e-11 #Nm/kg
formulae = (2*constant*mass)/radius
if constant == con:
return "I wanna move it move it , correct", math.sqrt(formulae)/1000
if constant != con:
return "Im falling, im going down, incorrect", False
G = 6.67e-11
print escape_velocity(6.67e-11,79997977979,0.009)
print escape_velocity(6.67e-11,5.34e24,6.4e6)
print escape_velocity(7e8,5555,55555)
No comments:
Post a Comment