def findInitialVelocity(s, v, t, theta): if (u is ""): ## find value of u if (s is not "") and (v is not "") and (t is not ""): ## use svut2 uVal = svut2(s, v, u, t, theta) elif (v is not "") and (s is not "") and (t is ""): ## use vuas uVal = vuas(v, u, g, s, theta) elif (v is not "") and (t is not "") and (s is ""): ## use vuat uVal = vuat(v, u, g, t, theta) elif (s is not "") and (t is not "") and (v is ""): ## use sutat2 uVal = sutat2(s, u, t, g, theta) else: ## missing value, can't continue raise ValueError('Cannot calculate value for "u".') uVal = float(uVal) else: uVal = float(u) print ("Initial velocity (u -> m/s) is %.10f" % uVal) return uVal
def findVelocity(v, s, u, t, theta): if (v is ""): ## find value of v if (s is not "") and (u is not "") and (t is not ""): ## use svut2 vVal = svut2(s, v, u, t, theta) elif (u is not "") and (s is not "") and (t is ""): ## use vuas vVal = vuas(v, u, g, s, theta) elif (u is not "") and (t is not "") and (s is ""): ## use vuat vVal = vuat(v, u, g, t, theta) else: ## missing value, can't continue raise ValueError('Cannot calculate value for "v".') vVal = float(vVal) else: vVal = float(v) print ("Velocity (v -> m/s) is %.10f" % vVal) return vVal
def findInitialVelocity(s, v, t, theta): if (u is ""): ## find value of u if (s is not "") and (v is not "") and (t is not ""): ## use svut2 uVal = svut2(s, v, u, t, theta) elif (v is not "") and (s is not "") and (t is ""): ## use vuas uVal = vuas(v, u, g, s, theta) elif (v is not "") and (t is not "") and (s is ""): ## use vuat uVal = vuat(v, u, g, t, theta) elif (s is not "") and (t is not "") and (v is ""): ## use sutat2 uVal = sutat2(s, u, t, g, theta) else: ## missing value, can't continue raise ValueError('Cannot calculate value for "u".') uVal = float(uVal) else: uVal = float(u) print("Initial velocity (u -> m/s) is %.10f" % uVal) return uVal
def findVelocity(v, s, u, t, theta): if (v is ""): ## find value of v if (s is not "") and (u is not "") and (t is not ""): ## use svut2 vVal = svut2(s, v, u, t, theta) elif (u is not "") and (s is not "") and (t is ""): ## use vuas vVal = vuas(v, u, g, s, theta) elif (u is not "") and (t is not "") and (s is ""): ## use vuat vVal = vuat(v, u, g, t, theta) else: ## missing value, can't continue raise ValueError('Cannot calculate value for "v".') vVal = float(vVal) else: vVal = float(v) print("Velocity (v -> m/s) is %.10f" % vVal) return vVal
def findHeight(s, u, v, t, theta): ## find value of s if (v is not "") and (u is not "") and (t is not ""): ## use svut2 sVal = svut2(s, v, u, t, theta) elif (u is not "") and (v is not "") and (t is ""): ## use vuas sVal = vuas(v, u, g, s, theta) elif (u is not "") and (t is not "") and (v is ""): ## use sutat2 sVal = sutat2(s, u, t, g, theta) sVal = float(sVal) print ("Height (s -> m) is %.10f" % sVal) return sVal
def findHeight(s, u, v, t, theta): ## find value of s if (v is not "") and (u is not "") and (t is not ""): ## use svut2 sVal = svut2(s, v, u, t, theta) elif (u is not "") and (v is not "") and (t is ""): ## use vuas sVal = vuas(v, u, g, s, theta) elif (u is not "") and (t is not "") and (v is ""): ## use sutat2 sVal = sutat2(s, u, t, g, theta) sVal = float(sVal) print("Height (s -> m) is %.10f" % sVal) return sVal