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 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
Example #4
0
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
Example #5
0
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
Example #6
0
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