I am trying to print the gravitational constant of Planet Earth. But it keeps on printing 0. What is wrong? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I am trying to print the gravitational constant of Planet Earth. But it keeps on printing 0. What is wrong?

Would you mind to spend an hour finding the bug and explaining it to me? https://code.sololearn.com/cTgJw76K92c5/?ref=app

9th Jun 2020, 5:03 AM
Purple Requiem
Purple Requiem - avatar
2 Answers
+ 5
You never called your "gravity" method.
9th Jun 2020, 5:09 AM
Kevin ★
+ 1
Kevin Star Kevin Star OMG THANK YOU!!!!!!!
9th Jun 2020, 5:11 AM
Purple Requiem
Purple Requiem - avatar