forked from coding-gouter-lillois/python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalculatrice.py
More file actions
executable file
·29 lines (24 loc) · 1.06 KB
/
calculatrice.py
File metadata and controls
executable file
·29 lines (24 loc) · 1.06 KB
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
operation = raw_input("Quelle opération ? ")
if (operation == "+") :
thomas = raw_input("Quel est le premier nombre ? ")
anne = raw_input("Quel est le second nombre ? ")
celeste = int(thomas) + int(anne)
print ("La somme est : %d" % celeste)
if (operation == "*") :
papa = raw_input("Quel est le premier nombre à multiplier ?")
maman = raw_input("Quel est le second nombre a multiplier ?")
oscar = int(papa) * int(maman)
print ("le resulta est : %d" % oscar)
if (operation == "-") :
tata = raw_input("Quel est le premier nombre à soustrere ?")
mikael = raw_input("Quel est le second nombre à soustrere ?")
pleure = int(tata) - int(mikael)
print ("le resulta est : %d" % pleure)
if (operation == "/") :
tonton = raw_input("Quel est le premier nombre à diviser ?")
elodie = raw_input("Quel est le second nombre à diviser ?")
mort = int(tonton) / int(elodie)
enterment =int(tonton) % int(elodie)
print ("le quosient est : %d et le reste est : %d" % (mort, enterment))