vecteurtest.py

Created by alexistb2904

Created on October 19, 2021

751 Bytes


import math
print("colli(x_1,x_2,y_1,y_2)")
print("collitest(x_1,x_2,y_1,y_2)")
print("long(x_1,x_2,y_1,y_2)")

def colli(x_1,y_1,x_2,y_2):
    print(x_2,"-", x_1)
    print(y_2,"-", y_1)
    print("=")
    resultx = x_2-x_1
    resulty = y_2-y_1
    print(resultx)
    print(resulty)
    
def collitest(x_1,y_1,x_2,y_2):
  return x_1*y_2-x_2*y_1==0

def long(x_1,y_1,x_2,y_2):
    print("**((", x_2,"-",x_1,")2 + (", y_2,"-",y_1,")2)")
    resultx = x_2-x_1
    resulty = y_2-y_1
    resultx = resultx^2
    resulty = resulty^2
    resultt = resultx + resulty
    resultt = math.sqrt(resultt)
    print("=", resultt)

def t():
  print("SG = Un = Uk*q^n-k")
  print("SA = Un = Uk+(n-k)*r")
  print("Taux de variation: Va - Vd / Vd")

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.