What is going wrong in this code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is going wrong in this code

I am trying to make a code on calculator. But some errors coming. Can you please solve this. https://code.sololearn.com/cnIMNsbsZhgr/?ref=app

19th Dec 2020, 12:01 PM
Ajay Malwal
Ajay Malwal - avatar
1 Answer
+ 3
It's not `flot`, it's `float`. You also need to indent line number 5. After fixing these, your code won't give error but still won't work as expected. The type of `b` is float, but you are comparing to a string on line 4. Instead don't call the `float` function on line 2. And please go through the basics of Python again in the python course https://www.sololearn.com/Course/Python/?ref=app
19th Dec 2020, 12:12 PM
XXX
XXX - avatar