Do i really need print command for calculations | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Do i really need print command for calculations

i have copied this code to pydroid3 and it's not showing answer .it only show program finished in output. not answer. but when i add print before the code it shows answer. i think pydroid 3 is based on python 3.7. Is this a restriction of app. 2**5 9 ** (1/2) answer [Program finished] print (2**5) print (9 ** (1/2)) answer 32 3.0 [Program finished]

28th May 2020, 6:34 AM
Rahul
Rahul - avatar
2 Answers
+ 3
No, thats all IDEs. What youre trying to do would work ín the Python interpretor. Doesnt matter wich python. In python 2.7 the syntax to print is: print <whatever you want to print> in 3.x its: print(<whatever you want to print>) In the app, theres an interpreter where you can enter code one line at a time like you enjoy
28th May 2020, 6:40 AM
Slick
Slick - avatar
+ 1
thanks
28th May 2020, 6:45 AM
Rahul
Rahul - avatar