Skip to content

Onyekachi - Core Week 2 Assignment - #15

Open
Barthy7 wants to merge 1 commit into
HackYourAssignment:mainfrom
Barthy7:main
Open

Barthy7 wants to merge 1 commit into
HackYourAssignment:mainfrom
Barthy7:main

Conversation

@Barthy7

@Barthy7 Barthy7 commented Nov 12, 2026

Copy link
Copy Markdown

I have completed the Week 2 assignment.

Task 1: Implemented and tested the leap-year calculator, including input validation.

Task 2: Implemented the login system with credential validation and login-attempt restrictions.

Task 3: Fixed the currency converter bugs and added the feature to display the current exchange rate.

I have tested the functionality and pushed my changes to my GitHub fork.

Thank you for reviewing my submission. I look forward to your feedback.

Regards
Onyekachi

@sarlam
sarlam self-requested a review November 17, 2026 19:54

@sarlam sarlam left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a spotless work, really good work here

Optionally if you want to be challenged I can propose you two other challenges for you to think about, you do not have to do them or push the code, it is just to keep your skills sharp:

Task 2

  • I would like you to imagine that you now have 1000 of users and password, how would it change your code?
  • more difficult, as of now we count for 4 attempts overall, could you think of a way to count 4 attempts on a specific username (so if I try 4 times with admin I can no longer try with it but I can try with user). How would it change the code

Task 3

  • What would happen if you had to implement not one new feature but 20?

You do not have to implement any of those, it is just to challenge you to think a bit more about your code and its limits

Great work

Comment thread task-1/leap-year.js
Comment on lines +7 to +13
if (!Number.isInteger(year) || year < 1 || year > 9999) {
console.log("Invalid year!");
} else if (year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)) {
console.log("Yes, " + year + " is a leap year");
} else {
console.log("No, " + year + " is not a leap year");
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sound and correct code here, nice work

Comment thread task-2/login.js
@@ -4,10 +4,26 @@ import { errorMessage, successMessage } from './app.js';
let incorrectAttempts = 0;

function onLogin(username, password) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also a good code that fits perfectly

@sarlam sarlam added the Reviewed This assignment has been reivewed by a mentor and a feedback has been provided label Nov 17, 2026
@Barthy7

Barthy7 commented Nov 18, 2026

Copy link
Copy Markdown
Author

This is a spotless work, really good work here

Optionally if you want to be challenged I can propose you two other challenges for you to think about, you do not have to do them or push the code, it is just to keep your skills sharp:

Task 2

  • I would like you to imagine that you now have 1000 of users and password, how would it change your code?
  • more difficult, as of now we count for 4 attempts overall, could you think of a way to count 4 attempts on a specific username (so if I try 4 times with admin I can no longer try with it but I can try with user). How would it change the code

Task 3

  • What would happen if you had to implement not one new feature but 20?

You do not have to implement any of those, it is just to challenge you to think a bit more about your code and its limits

Great work

@Barthy7

Barthy7 commented Nov 18, 2026

Copy link
Copy Markdown
Author

Dear sarlam, Thank you so much for the review and the kind words. i will love to challenge myself to the tasks you outlined and continue to learn to sharpen my skills. where and when i am stuck and need assistance, i will reach out to you. once again, i do appreciate the feedback.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed This assignment has been reivewed by a mentor and a feedback has been provided

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants