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 12:50
In which source of water would a wave travel the fastest? o ice o cold o room temperature o hot mark this and return save and exit next
Answers: 2
question
Mathematics, 21.06.2019 13:30
Find the missing factor. 7s2 + 25s + 12 = (s + 3)( ).
Answers: 1
question
Mathematics, 21.06.2019 21:10
Jenny earned a 77 on her most recent test jenny score is no less then 5 points greater then 4/5 of terrance’s score if t represents terrance score which inequality represents the situation
Answers: 3
question
Mathematics, 21.06.2019 23:00
What are two numbers that add up to -9 and multiply to -10 best answer gets branliest and 100 extra points
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
Chemistry, 27.08.2019 13:00
question
Mathematics, 27.08.2019 13:00
Questions on the website: 13722361