Skip to content

Jawad A.#8

Open
jivvyjams wants to merge 2 commits intoHackYourAssignment:mainfrom
jivvyjams:main
Open

Jawad A.#8
jivvyjams wants to merge 2 commits intoHackYourAssignment:mainfrom
jivvyjams:main

Conversation

@jivvyjams
Copy link
Copy Markdown

No description provided.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown

📝 HackYourFuture auto grade

Assignment Score: 0 / 100 ✅

Status: ✅ Passed
Minimum score to pass: 0
🧪 The auto grade is experimental and still being improved

Test Details

@JQnetherlands JQnetherlands self-requested a review April 1, 2026 08:31
@JQnetherlands JQnetherlands self-assigned this Apr 1, 2026
Comment thread task-1/Time.js
}

#normalize() {
this.#secondsFromMidnight %= 86400;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

well done

Comment thread task-1/Time.js
}

getSeconds() {
return this.#secondsFromMidnight % 60;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

good use of %

Comment thread task-1/Time.js
}

getMinutes() {
return Math.floor((this.#secondsFromMidnight % 3600) / 60);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

good use of %

Comment thread task-2/index.js
- Only one answer is correct.
- Make the questions clear and suitable for a CLI quiz game.
- Return ONLY valid JSON.
- Do not include markdown code fences.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good prompt

Comment thread task-2/index.js
try {
const questions = JSON.parse(text);

const isValid =
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Very good just in case wrong answer from the model

Comment thread task-2/index.js

return questions;
} catch (error) {
console.log(chalk.red("Failed to parse quiz questions from the AI."));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

very user friendly

Comment thread task-2/index.js

let userAnswer;

while (true) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

smart while

Comment thread task-2/index.js

let score = 0;

for (let i = 0; i < questions.length; i++) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice

Copy link
Copy Markdown

@JQnetherlands JQnetherlands left a comment

Choose a reason for hiding this comment

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

Hello Jawad

Your class is well done, your code achieve all the goals, you handle all the edges cases. The only feedback I have is that you can put more comments in your code for your future you or colleague. I see you do understand the use of the modulo %, it is a very good trick in javaScript and make you write much less logic of your own.

About task 2, I mocked the question with my own MokeQuestions.js, cos I don’t have right now a credit card valid for getting an API key, I trust you try your proyect with your own Key, with my moke file your code indeed work as expected, I like the colours that you use, and more important, you make very clear what is the question, the good answer, and the wrong answer.

Congratulations for the good work! I wish you all the best for your career!

@JQnetherlands JQnetherlands added the Reviewed This assignment has been reivewed by a mentor and a feedback has been provided label Apr 1, 2026
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