Title: Exercise How Old (Part 7) - Persistent test failure on test2 and test3
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the failure through the TMC extension using the How Old exercise and the reported inputs. Start by inspecting HowOldTest, especially test2_test_with_older_ones and test3_test_with_younger_ones, and compare their expected output with the submitted program's output. Done means both tests pass for the reported cases.
Written by the indexing model from the issue text.
Description
I am experiencing a persistent failure with the "How Old" exercise in Part 7. Despite the logic being correct for calculating the difference between the user's birth date and December 31, 1999(the eve of the new milennium), the TMC extension returns the following errors:
HowOldTest: test2_test_with_older_ones (Inputs: 1, 1, 1900)
HowOldTest: test3_test_with_younger_ones (Inputs: 1, 1, 2100)
Code Used:
from datetime import datetime
day = int(input("Day: "))
month = int(input("Month: "))
year = int(input("Year: "))
millennium_eve = datetime(1999, 12, 31)
birth_date = datetime(year, month, day)
if birth_date < millennium_eve:
difference = millennium_eve - birth_date
print(f"You were {difference.days} days old on the eve of the new millennium.")
else:
print("You weren't born yet on the eve of the new millennium.")
- Dominant language
- JavaScript
- Stars
- 77
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rage/programming-26
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
rage/programming-26#74 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
rage/programming-26#68 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
rage/programming-26#62 ·
-
A typo in Part 4 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rage/programming-26#56 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
rage/programming-26#55 ·
All issues in rage/programming-26
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·