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, 20.06.2019 18:04
I’m stuck on this i don’t understand.
Answers: 1
question
Mathematics, 21.06.2019 18:00
Which ordered pair is a solution to the system of linear equations? 2x + 3y= 6 –3x + 5y = 10
Answers: 1
question
Mathematics, 22.06.2019 00:20
The police chief wants to know if the city’s african americans feel that the police are doing a good job. identify the management problem (i.e dependent variable) and identify the independent variable.
Answers: 1
question
Mathematics, 22.06.2019 00:30
Carl is hanging pictures in his home. there is a space on a wall that has a width of 4 feet. carl has pictures with different widths. which picture width would fit in the space on the wall? a. 46 inches b. 60 inches c. 50 inches d. 54 inches
Answers: 1
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
Arts, 11.03.2021 01:30
question
English, 11.03.2021 01:30
question
Mathematics, 11.03.2021 01:30
question
Biology, 11.03.2021 01:30
question
Mathematics, 11.03.2021 01:30
question
Biology, 11.03.2021 01:30
Questions on the website: 13722367