-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddition.py
39 lines (27 loc) · 833 Bytes
/
Addition.py
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
#coding:utf-8
"""
Opérateurs en Python : + (addition)
- (soustraction)
+ (multiplication)
/ (division)
% (modulo) -> reste d'une division euclidienne
variable = variable + X
variable += X
variable = variable - X
variable -= variable
variable = variable * X
variable *= variable
"""
calcul = 5 / 2
calcul = int(calcul)
calcul2 = 5 % 2
calcul2 = int(calcul2)
print("Résultat =", calcul, "reste", calcul2)
niveau_personnage = input("Niveau de départ? ")
niveau_personnage = int(niveau_personnage)
print("Niveau du perso, ", niveau_personnage)
print("Combat réussi, tu gagnes un niveau !")
niveau_personnage = niveau_personnage +1
#idemn à
niveau_personnage += niveau_personnage
print("Niveau du perso", niveau_personnage)