Closed gems-rk23 closed 1 year ago
Hi @gems-68239853, thank you for raising the issue and we hope you enjoy working on your Python exercises.
Function period
should compute and return the period of a single planet. Then you should call it separately for Mars and for Earth. In your case, you are computing all periods, including birthday in the function, and return a tuple. We believe that fixing this would make PyBryt tests pass.
Hello Mr. Marijanbeg, thank you for responding to me.
Thank you for the hint, I fixed my code and it worked perfectly!
Great, thank you for letting us know.
This is my code:
Uncomment and complete this code - keep the names the same for testing purposes.
from math import pi, sqrt
def period(a, m_planet, m_sun=2e30, G=6.67e-11): P_mars = sqrt(4*pi2(1.5a)3/(G(m_sun + 0.1m_planet))) P_earth = sqrt(4*pi*2a*3/G/(m_sun + m_planet)) birthdays = 10P_mars/P_earth return P_mars, P_earth, birthdays
but when I test it by pybryt, it shows this comment below:
REFERENCE: exercise-1_9 SATISFIED: False MESSAGES:
What is wrong with my code?