-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalcul .py
More file actions
49 lines (25 loc) · 1003 Bytes
/
calcul .py
File metadata and controls
49 lines (25 loc) · 1003 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
42
43
44
45
46
47
48
49
def operations ():
while True:
print("bienvenue dans le menu des operations")
print("1 -addition ")
print("2-soustraction")
print("3 - multiplication")
print("4 - division")
choix= int(input('faites votre choix ici'))
if choix in [1,2,3,4]:
nombre1=float(input('enter your firts number:'))
nombre2=float(input(' enter your second number:'))
if choix==1 :
result=nombre1+nombre2
elif choix==2:
result=nombre1-nombre2
if choix==3:
result=nombre1*nombre2
print('the result is ',result)
if choix==4:
result=nombre1/nombre2
else:
print(" s'il vous plait refaite votre choix ")
continue
if __name__=="__main__":
operations()