-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoprateurs.py
More file actions
42 lines (29 loc) · 987 Bytes
/
oprateurs.py
File metadata and controls
42 lines (29 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# exo 1
mystery1 = 8 + 6
mystery2 = 8 - 6
print("Le nombre mystère est : "+str(mystery2))
# exo 2
zebrasInZoo = 8
giraffesInZoo = 4
animalsInZoo = zebrasInZoo + giraffesInZoo
print("Le zoo contient : "+str(animalsInZoo)+" animaux")
# exo 3
prixInitial = 1500
tva = 0.20
prixFinal = prixInitial * (1+tva)
print("Le prix final est : "+str(prixFinal))
# exo 4 - 1
nbOeufsParBoite = 6
nbOeufsTotal = 145
nbBoites = nbOeufsTotal // nbOeufsParBoite
nbOeufsRestant = nbOeufsTotal % nbOeufsParBoite
print("Nous avons "+str(nbBoites)+" boites de 6 oeufs est il reste "+str(nbOeufsRestant)+" oeufs")
# exo 4 - 2
# figures (7,8,9,.., roi, as) vaut (0,1,2 ... 6, 7)
# couleurs (pique, cœur, carreau, trèfle)) vaut (0,1,2 ou 3)
# Exemple :
# le 9 de pique a pour numéro = 2+8*0 = 2 (3e carte de la couleur 0)
# la dame de cœur a pour numéro = 5+8*1 = 13
numeroCarteMystere = 28 # numeroFigure * numeroCouleur
# enoncé pas bon :-/
print("Pschittttt pour la carte ...")