subject
Mathematics, 29.01.2021 14:00 Flowershere121

On a exécuté le script ci-dessous en Python: 1 def pente(XA, YA, XB, YB):
2 return(yB-ya)/(XB-XA)
1. a. On a ainsi défini une fonction informatique.
Quel est son nom ? Quels sont ses arguments ?
b. Quelle sortie obtient-on en exécutant l'instruction
pente(2,-1,3,5) ?
c. Interpréter graphiquement cette fonction.
2. a. Que se passe-t-il si on exécute l'instruction
pente(-1,2,-1,4)?
b. Recopier et compléter le script ci-dessous pour gérer
le problème précédent :
1 def pente(XA, YA, XB, YB):
2 if ...
3
return("impossible")
4 else:
5
return
Remarque : on peut aussi ajouter la ligne 2 ci-dessous qui
teste si XA est différent de xB et interrompt l'exécution si
ce n'est pas le cas.
1 def pente(xA, YA, XB, YB):
assert XA != XB
return(yB - yA)/(XB-XA)
WNH
43
Chapitre 1. Ensembles de nombres. Fonctions affines

ansver
Answers: 3

Another question on Mathematics

question
Mathematics, 21.06.2019 18:00
Aman is 6 feet 3 inches tall. the top of his shadow touches a fire hydrant that is 13 feet 6 inches away. what is the angle of elevation from the base of the fire hydrant to the top of the man's head?
Answers: 1
question
Mathematics, 21.06.2019 19:30
Asquare picture with sides of 32 inches is to be mounted on a square mat with sides of 52 inches. find the area of the mat that will remain uncovered by the picture.
Answers: 1
question
Mathematics, 21.06.2019 19:30
Runner ran 1 4/5 miles on monday and 6 3/10 on tuesday. how many times her monday’s distance was her tuesdays distance
Answers: 1
question
Mathematics, 22.06.2019 01:20
Describe how to determine the average rate of change between x = 4 and x = 6 for the function f(x) = 2x^3 + 4. include the average rate of change in your answer.
Answers: 3
You know the right answer?
On a exécuté le script ci-dessous en Python: 1 def pente(XA, YA, XB, YB):
2 return(yB-ya)/(XB...
Questions
question
Social Studies, 24.11.2021 17:20
question
Advanced Placement (AP), 24.11.2021 17:30
question
Mathematics, 24.11.2021 17:30
Questions on the website: 13722363