0

Can u plz help me make calculator with python language, thx

21st Jan 2021, 6:09 PM
Shogher Frangulyan
Shogher Frangulyan - avatar
5 odpowiedzi
+ 3
Shogher Frangulyan Start with 3 inputs: num1 num2 operator Then write a code which identifies the operator, and the actions that operator has on the 2 nums. You can do this with if, elif, else statements or by creating a dictionary. There are lots of examples posted on Sololearn
21st Jan 2021, 10:49 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
But how?
21st Jan 2021, 6:56 PM
Shogher Frangulyan
Shogher Frangulyan - avatar
+ 1
I will give an advice to start with: operation= input()#enter the full operation i.e 5+4, 89*7.. and then check if the plus operator "+" is in the operation, if it's the case, then use + elif check for / and * and so on ... it's easy just try with it! good luck !
21st Jan 2021, 10:44 PM
Hisham YUM 🇲🇦
Hisham YUM 🇲🇦 - avatar
23rd Jan 2021, 7:36 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
∆BH∆Y Thanks, but I learnt this technique from Sololearn, so the credit goes to the community. 🖐😁👍
23rd Jan 2021, 9:14 AM
Rik Wittkopp
Rik Wittkopp - avatar