def findTime(t, s, u, v, theta): if (t is ""): ## find value of t if (s is not "") and (v is not "") and (u is not ""): ## use svut2 tVal = svut2(s, v, u, t, theta) elif (v is not "") and (u is not "") and (s is ""): ## use vuat tVal = vuat(v, u, g, t, theta) elif (s is not "") and (u is not "") and (v is ""): ## use sutat2 tVal = sutat2(s, u, t, g, theta) else: ## missing value, can't continue raise ValueError('Cannot calculate value for "t".') else: tVal = float(t) print ("Time (t -> s) is %.10f" % tVal) return tVal
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 findTime(t, s, u, v, theta): if (t is ""): ## find value of t if (s is not "") and (v is not "") and (u is not ""): ## use svut2 tVal = svut2(s, v, u, t, theta) elif (v is not "") and (u is not "") and (s is ""): ## use vuat tVal = vuat(v, u, g, t, theta) elif (s is not "") and (u is not "") and (v is ""): ## use sutat2 tVal = sutat2(s, u, t, g, theta) else: ## missing value, can't continue raise ValueError('Cannot calculate value for "t".') else: tVal = float(t) print("Time (t -> s) is %.10f" % tVal) return tVal
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 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