Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Having problem with python syntax while writing a calculator app

-> The Codes Image <-

I wrote this calculator app today and for some reason this just doesn’t work.

when I use -, /, and * it gives a syntax error and when I use the + it doesn’t treat the numbers as numbers but rather adds them together like a string.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

btw this code worked just fine with python 3.9 but has problems like this with python 3.11

could anyone help with this please?
I have tried maybe editing or something but no luck yet

>Solution :

looking at the image you attached I see the problem, you need to change the following lines of code

From this

Number_one = input(int())
Number_two = input(int())

To this

Number_one = int(input())
Number_two = int(input())
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading