Plusieurs bonnes réponses sont possibles.
Etes vous un garçon ou une fille ?
Si a = (1==(2-1) and not (2 < 1)) alors a est égal à :
Je veux tester si une variable a est égale à une variable b ou à une variable c, je dois écrire :
On donne le programme
a = int(input("Donner un nombre :")) if a==2 or a>5: print("gagné")
On donne le programme suivant :
a = 7 b = 6 if a>b: print(a) print(b)
On veut ecrire un programme qui affiche le plus petit de trois nombres donnés, quels sont les programmes qui marchent : Que va afficher le programme ?
a = int(input("donner un nombre")) b = int(input("donner un nombre")) c = int(input("donner un nombre")) if a ≤ b and c: print(a) elif b ≤ c: print(b) elif: print(c)
a = int(input("donner un nombre")) b = int(input("donner un nombre")) c = int(input("donner un nombre")) min = a if min > b: min = b if min > c: min = c print(min)
a = int(input("donner un nombre")) b = int(input("donner un nombre")) c = int(input("donner un nombre")) if a ≤ b ≤ c: print(b) if b ≤ a ≤ c: print(a) if a ≤ c ≤ b: print(c)
a = int(input("donner un nombre")) b = int(input("donner un nombre")) c = int(input("donner un nombre")) if a ≤ b and a ≤ c: print(a) elif b ≤ c: print(b) else print(c)
(True and not(True)) or (not(False)) =
phpMyVisites | Open source web analytics