Need Help with python time calculator project

i can’t find whats wrong with my script it works on pycharm
here is the link https://repl.it/@MarwanAbdulmann/fcc-time-calculator-2#time_calculator.py any help would be appreciated

In this we’ve to play with integers and string
image
You’re not maintaining preceding zeroes while returning the time… check the sample format…

Consider printing your output once to get a clear idea of what actually you’re returning.

what should be my output string or int and string ?
in my pycharm its working fine

Look at the test output on repl.it, particularly this part of the output

Specifically:

AssertionError: '3:7 Pm ' != '3:07 PM'

and below. Your tests are telling you that you are not printing the zero in 3:07 and that your 'Pm ' is not the same as 'PM'. Most of your tests are failing due to extra or missing spaces or zeroes or capitalization that does not match.

Everywhere in the test output you see AssertionError, the test is showing the comparison between the results your code provides and what it should provide, so that you can use this information to debug the problem.

1 Like

Well explained @jeremy.a.gray
I’m somewhat bad at explaining things, Hope I’ll be able to explain solutions better !!

I’m replying quite late so I assume you’ve already solved your problem but I have an idea to improve your calculator. Use a GUI and make it interactive and simpler to use, like a real calculator.

Use a GUI Designer to save time and then generate your GUI components into Python code and add your current code and make a proper calculator.

MD Python(MD Python (Free) - LabDeck) and MD Python Designer(MD Python Designer - LabDeck) would be the best fit for you as they are the only GUI Designers I know that can generate the components into python code. They are both super affordable and one of them is free.