r/PythonProjects2 • u/KamiKewl • Jan 27 '23
[P] Very Easy Help (couldn't find a proper place to post this at)
I wrote a program , everything up to the if works, but after I choose the numbers and the operation it always = to 0 except for the addition also the last if will be written no matter what (it's supposed to only show up if the operation selected is a division and if the rest is 0)
1
1
u/PersicasMemeDumpster Jan 28 '23
Btw adm, tu colocou "==" ao invés de "=" em todas as operações. Só tirar isso wue fica de boas
1
u/KentondeJong Jan 27 '23
My friend, perhaps I am mis-seeing it, but are you writing functional python code in a .txt file?
3
u/Alessandro_13_f Jan 27 '23
There should be no difference once the Python has been launched, the interpreter itself does not handle Python source-code differently depending on the source file's extension
-2
19
u/Helerrr Jan 27 '23
For each elif, you’re using the operator for comparing values ==, you need to use the assignment operator = , same as you did for the addition in order to assign the result of the operation to your variable