import mathx = 10v0 = 10g = 9.8angle = 45y0 = 150y = x * math.tan(angle) - (1 / 2 * v0) * (g * x * x)/math.cos(2 * angle) + y0print("yValeur de: {}".format(y))
Si vous pensez que les réponses vous aideront,Veuillez cliquer ci - dessous pour l'adopter,Merci beaucoup.~
import mathdef fun(x,v0,g,d,y0): y=x*math.tan(d)-g*x*x/(2*v0*math.cos(2*d))+y0 return y v0=10g=9.8d=60y0=150 #cmx=float(input('Entréex:'))print('yLa valeur de:',fun(x,v0,g,d,y0),'cm')
Si ça marche.AdoptionUn instant.
import mathv0 = 1g = 1o = 1y0 = 1x = 1y = x*math.tan(o)-1/(2*v0)*(gxx/math.cos(2o))+y0print(y)
import turtleimport mathv0 = float(input("vo:"))g = float(input("g:"))the = float(input("the:"))y0 = float(input("y0:"))T = turtle.Turtle()turtle.tracer(False)T.up()for x in range(0, 200, 4): y =y0 + x * math.tan(math.radians(the)) -(g * pow(x, 2)) / (2 * v0 * math.cos(2 *math.radians(the))) T.goto(x, y) T.pd() T.up()turtle.tracer(True)turtle.done()