+ 1
I have a problem trying to execute if statements in my calculator project
https://sololearn.com/compiler-playground/ccm2PRh16J3l/?ref=app
7 Respuestas
+ 3
answer=print(input("What shape is here"))
Print the content of "answer". What do you observe? print() does not have a return value. Hence, "answer" will be None, no matter what you enter.
input() always returns a string. So when you enter "2.3", it will be a string, not a number. You need to convert the input to a numeric value.
The same 2 things apply to the other parts of your program.
Also, mind that sololearn Python playground is not interactive. You need to input all values in the beginning of the program – separated by line breaks. Read the small test in the pop-up window.
+ 1
Yeah Lisa is correct
You should not put input() inside print()
Other suggestions I would like to add are
Surface area for sphere is 4πr²
Not 4πr³
And pi value is 3.14159...
Not 3.1428
Hope it helps you ✨
+ 1
Thank you for your suggestions❤️❤️But I'm still wondering how I'll get to involve the user🤔What if I put and 'int' after input inside the print😅 I mean..won't it work?
+ 1
Thanks again😌
0
Hacker Badshah ,Lisa thanks so much😌❤️I'm still on it I want to also add BMI and even step count😂🔥



