Skip to content

Glasgow | 26-SDC-Mar | Mohammed Abdoon | Sprint 2 | Jq#392

Open
M-Abdoon wants to merge 4 commits intoCodeYourFuture:mainfrom
M-Abdoon:jq-exercise
Open

Glasgow | 26-SDC-Mar | Mohammed Abdoon | Sprint 2 | Jq#392
M-Abdoon wants to merge 4 commits intoCodeYourFuture:mainfrom
M-Abdoon:jq-exercise

Conversation

@M-Abdoon
Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • [X ] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • [X ] My changes meet the requirements of the task
  • [X ] I have tested my changes
  • [X ] My changes follow the style guide

Changelist

jq exercises solved.

Questions

No questions, thank you!

@M-Abdoon M-Abdoon added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 19, 2026
Copy link
Copy Markdown

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Solution looks good. Just one question.

Comment thread jq/script-11.sh
# The input for this script is the scores.json file.
# TODO: Write a command to output the total of adding together all scores from all games from all players.
# Your output should be exactly the number 164.
jq -r '[.[].scores] | add | add' scores.json 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.

Can you explain why the query needs two add?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

the ( .[].scores ) returns an array of arrays. The first add combines all score arrays into one big array, and the second add sums all the numbers to finally get 164.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 9, 2026
@M-Abdoon
Copy link
Copy Markdown
Author

Solution looks good. Just one question.

Thank you. Question answered.

@M-Abdoon M-Abdoon added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels May 10, 2026
@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 10, 2026
@cjyuan
Copy link
Copy Markdown

cjyuan commented May 10, 2026

All good.

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

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants