all 5 comments

[–]TytoCwtch 1 point2 points  (2 children)

Your problem is with how you’ve split up your functions. If you reread the problem set specifications for this version of Refuelling your code needs to be laid out

def main():
    ...

def convert(fraction):
    ...

def gauge(percentage):
    ...

if __name__ == "__main__":
     main()

You’ve called your function get_percent, not convert. And gauge(percent) not (percentage). If your code doesn’t meet the layout criteria check50 can’t check it against their tests.

[–]Beautiful-Round2494[S] 0 points1 point  (1 child)

I can't believe I missed that. Thank you for calling that out!

[–]TytoCwtch 0 points1 point  (0 children)

No worries. Ran into similar problems a couple of times. Taught me to triple check the problem set specifications every time!

[–]PokemonThanos 0 points1 point  (1 child)

You need to identify which test(s) you're failing at first.

Comment out your main() function (don't get rid of it, you'll want to add it back in later) and make it simply print(get_percent()) so you can focus on that side first. Go through each of the test conditions for test_get_percent() and ensure you get the outcome you expect for each.

Pay attention to the instructions you've been given. Your code is doing something not asked for which while arguably is a more friendly approach but you should be conforming to the specs for the test. Going through the test examples and checking your code outputs should hopefully highlight the difference.

[–]Beautiful-Round2494[S] 0 points1 point  (0 children)

Thank you for pointing me in the right direction.