import numpy
from numpy import cos
from numpy import sin
from numpy import tan
from numpy import radians
from numpy import degrees
print ("Problem 1")
print ("This program is intened for when you have the applied force, the incline, the mass, and the mu. You will be trying to find the acceleration. ")
import numpy
from numpy import cos
from numpy import sin
from numpy import tan
from numpy import radians
from numpy import degrees
mass = float(input("What's the mass?"))
F = float(input("What's the force?"))
d = float(input("What's the angle measure?"))
mu = float(input("What's the mu?"))
def sin(degrees):
return(numpy.sin(numpy.radians(degrees)))
def cos(degrees):
return(numpy.cos(numpy.radians(degrees)))
Fx = F*cos(d)
print (Fx)
Fy = F*sin(d)
print (Fy)
Fg = mass*9.81
print (Fg)
Fn = Fg-Fy
print (Fn)
Fk = mu*Fn
print (Fk)
ax = (Fx-Fk)/mass
print (ax)
ii = True
while ii == True:
print ("Problem 2")
print ("This program is intended for when you have the mass, the incline of a ramp, the incline that the item is being pulled up the ramp, the mu, and the applied force. You will be trying to find the acceleration. ")
import numpy
mass = float(input("What's the mass?"))
F = float(input("What's the force?"))
d = float(input("What's the angle measure?"))
mu = float(input("What's the mu?"))
incline = float(input("What is the incline?"))
def sin(degrees):
return(numpy.sin(numpy.radians(degrees)))
def cos(degrees):
return(numpy.cos(numpy.radians(degrees)))
#Find the F,x and F,y
Fx = F*cos(d)
Fy = F*sin(d)
#Find Force due to gravity
Fg = mass*9.81
#Find Fg,x and Fg,y
Fgx = Fg*sin(incline)
Fgy = Fg*cos(incline)
#Find Fn
Fn = Fgy-Fy
#Find Fk
Fk = mu*Fn
#Find acceleration
ax = (Fx-Fk-Fgx)/mass
print(ax)
ii = True
while ii == True:
print ("Problem 3, Part A")
print ("This program is intended for when you have the mass, the incline of the ramp, and the acceleration.You will be trying to find the mu. ")
import numpy
mass = float(input("What's the mass?"))
a = float(input("What's the acceleration?"))
incline = float(input("What is the incline?"))
def sin(degrees):
return(numpy.sin(numpy.radians(degrees)))
def cos(degrees):
return(numpy.cos(numpy.radians(degrees)))
#calculate Force
MF = mass*a
print (MF)
#calculate Fg
Fg = mass*9.81
print (Fg)
#calculate Fgy and Fgx
Fgy = Fg*cos(incline)
Fgx = Fg*sin(incline)
print (Fgy)
print (Fgx)
#calculate Fn
Fn = Fgy
print (Fn)
#Calculate Fk
Fk = Fgx-MF
print (Fk)
#Calculate mu
mu = Fk/Fn
print (mu)
ii = True
while ii == True:
print ("Problem 3, Part B")
print ("This program is intended for when you have the mass, the incline of the ramp, the incline, and the mu. You will be trying to find the acceleration. ")
import numpy
def sin(degrees):
return(numpy.sin(numpy.radians(degrees)))
def cos(degrees):
return(numpy.cos(numpy.radians(degrees)))
m = float(input("What's the mass?"))
incline = float(input("What's the incline of the ramp?"))
mu = float(input("What's the mu?"))
#Caluclate Fgx
Fgx = m*9.81*sin(incline)
print (Fgx)
#Calculate Fn (Fgy)
Fn = m*9.81*cos(incline)
print (Fn)
#Calculate Fk
Fk = mu*Fn
print (Fk)
#Calculate Fxnet
Fxnet = Fgx-Fk
print (Fxnet)
#Calculate A
A = Fxnet/m
print (A)
ii = True
while ii == True:
print ("Problem 4")
print ("This is for when you have Fg, applied force, and incline. You will be calculating mu.")
import numpy
def sin(degrees):
return(numpy.sin(numpy.radians(degrees)))
def cos(degrees):
return(numpy.cos(numpy.radians(degrees)))
N = float(input("What's the newtons?"))
F = float(input("What's the force?"))
incline = float(input("What's the incline?"))
#Calculate Mass
mass = N*9.81
print (mass)
#Calculate Fx and Fy
Fx = F*cos(incline)
print (Fx)
Fy = F*sin(incline)
print (Fy)
#Calculate Fk
Fk = 347.287
print (Fk)
#Calculate Fg
Fg = 325
print (Fg)
#Calculate Fn
Fn = Fg-Fy
print (Fn)
#Calculate mu
mu = Fk/Fn
print (mu)