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:30
Ametal rod needs to be 9 feet and 5.5 inches in length. the sections of the poles being used are each 1 foot and 10.5 inches long. how many 1ft 10.5in sections would be needed to complete the 9ft 5.5in metal rod? and how many inches of material will be left?
Answers: 1
question
Mathematics, 22.06.2019 00:30
The value, v, of kalani’s stock investments over a time period, x, can be determined using the equation v=750(0.80)^-x. what is the rate of increase or decrease associated with this account? 20% decrease 20% increase 25% decrease 25% increase
Answers: 1
question
Mathematics, 22.06.2019 00:30
Long division setup showing an incomplete calculation. 12 is in the divisor, 6839 is in the dividend, and 5 hundreds and 6 tens is written in the quotient. 6000 is subtracted from 6839 to give 839. an unknown value represented by a box is being subtracted from 839. what number should be placed in the box to complete the division calculation?
Answers: 3
question
Mathematics, 22.06.2019 02:00
Idon't want to fail summer school.the probabilities of contamination in medicine capsules due to the presence of heavy metals and different types of microbes are given in the table.the probability of capsule b having microbial contamination is (the same as, greater than, less than) the probability of capsule d having it.
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
Mathematics, 11.12.2020 07:10
question
Mathematics, 11.12.2020 07:10
question
Mathematics, 11.12.2020 07:10
question
Mathematics, 11.12.2020 07:10