# Need Help with python time calculator project

**URL:** <https://forum.freecodecamp.org/t/need-help-with-python-time-calculator-project/423672>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [October 2, 2020, 4:50am UTC](https://forum.freecodecamp.org/t/need-help-with-python-time-calculator-project/423672 "2020-10-02T04:50:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarwanNewAtCoding](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/marwannewatcoding/32/181414_2.png) [@MarwanNewAtCoding](https://forum.freecodecamp.org/u/MarwanNewAtCoding)\
**Post date:** [October 2, 2020, 4:50am UTC](https://forum.freecodecamp.org/t/need-help-with-python-time-calculator-project/423672/1 "2020-10-02T04:50:40Z")

</div>

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](https://repl.it/@MarwanAbdulmann/fcc-time-calculator-2#time_calculator.py) any help would be appreciated

---

<div class="post-metadata">

**Author:** ![mukeshgurpude](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mukeshgurpude/32/180919_2.png) [@mukeshgurpude](https://forum.freecodecamp.org/u/mukeshgurpude)\
**Post date:** [October 2, 2020, 12:51pm UTC](https://forum.freecodecamp.org/t/need-help-with-python-time-calculator-project/423672/2 "2020-10-02T12:51:37Z")

</div>

In this we’ve to play with integers and string  
 ![image](https://global.discourse-cdn.com/freecodecamp/original/3X/5/e/5e9ff5e54314a99b49c685f5fdca174f83b70f6d.png)  
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.

---

<div class="post-metadata">

**Author:** ![MarwanNewAtCoding](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/marwannewatcoding/32/181414_2.png) [@MarwanNewAtCoding](https://forum.freecodecamp.org/u/MarwanNewAtCoding)\
**Post date:** [October 2, 2020, 2:32pm UTC](https://forum.freecodecamp.org/t/need-help-with-python-time-calculator-project/423672/3 "2020-10-02T14:32:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeremy.a.gray](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremy.a.gray/32/181458_2.png) [@jeremy.a.gray](https://forum.freecodecamp.org/u/jeremy.a.gray)\
**Post date:** [October 2, 2020, 2:56pm UTC](https://forum.freecodecamp.org/t/need-help-with-python-time-calculator-project/423672/4 "2020-10-02T14:56:59Z")

</div>

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

> [@mukeshgurpude](#):
>
> In this we’ve to play with integers and string  
> ![image](https://global.discourse-cdn.com/freecodecamp/original/3X/5/e/5e9ff5e54314a99b49c685f5fdca174f83b70f6d.png)

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.

---

<div class="post-metadata">

**Author:** ![mukeshgurpude](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/mukeshgurpude/32/180919_2.png) [@mukeshgurpude](https://forum.freecodecamp.org/u/mukeshgurpude)\
**Post date:** [October 3, 2020, 1:20am UTC](https://forum.freecodecamp.org/t/need-help-with-python-time-calculator-project/423672/5 "2020-10-03T01:20:07Z")

</div>

> [@jeremy.a.gray](#):
>
> `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.

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

---

<div class="post-metadata">

**Author:** ![treynord](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@treynord](https://forum.freecodecamp.org/u/treynord)\
**Post date:** [February 24, 2021, 9:32pm UTC](https://forum.freecodecamp.org/t/need-help-with-python-time-calculator-project/423672/6 "2021-02-24T21:32:56Z")

</div>

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](https://labdeck.com/python/)) and MD Python Designer([MD Python Designer - LabDeck](https://labdeck.com/python-designer/)) 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.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:29pm UTC](https://forum.freecodecamp.org/t/need-help-with-python-time-calculator-project/423672/7 "2021-06-01T18:29:22Z")

</div>

Closed on June 1, 2021, 6:29pm UTC


