Skip to content

London | 26-ITP-Sep | Shirin Panahian | Sprint 2 | Complete Sprint 2 Coursework - #1545

Open
shirinpanahian wants to merge 16 commits into
CodeYourFuture:mainfrom
shirinpanahian:coursework/sprint-2
Open

shirinpanahian wants to merge 16 commits into
CodeYourFuture:mainfrom
shirinpanahian:coursework/sprint-2

Conversation

@shirinpanahian

Copy link
Copy Markdown

Learners, PR Template

Self checklist

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

Task code

CYF-1039

Changelist

I solve and complete every 4 section and understand how write the java code and find the error.

@netlify

netlify Bot commented Sep 19, 2026

Copy link
Copy Markdown

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit ccb29be
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6aafa7d7721c6d000845ba47
😎 Deploy Preview https://deploy-preview-1545--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@shirinpanahian shirinpanahian added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 19, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 19, 2026
@github-actions

This comment has been minimized.

@shirinpanahian shirinpanahian added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 20, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 20, 2026
@shirinpanahian shirinpanahian added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 20, 2026

@abdishakoor-dev abdishakoor-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good work on the interpret section. All five answers in 1-percentage-change.js are right, including the declarations, which people often get wrong.

A few things to fix:

  1. 1-key-exercises/3-paths.js line 16, see my comment.

  2. 1-key-exercises/4-random.js line 10, see my comment.

  3. 3-mandatory-interpret/2-time-format.js answer f), see my comment.

  4. 2-mandatory-errors/1.js line 6, see my comment.

  5. Could you run Prettier on the files you have changed? Most of them are not formatted at the moment.

Add the Needs Review label again when you have pushed.

const ext = ;

// https://www.google.com/search?q=slice+mdn No newline at end of file
const dir = filePath.slice(0,`${lastSlashIndex}`-1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Run this file and read the dir line carefully. It prints .../week-1/interpre, and the folder is called interpret. One character is being lost. What is the - 1 doing at the end of this line, and does slice need it?

//num represents a random whole number between 1 and 100,
//first we calculate value inside parentheses(maximum - minimum +1) = 100 -1 + 1 =100
// math.random return number between 0 and 1
// math.random() * 100 give us a integer number

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Have a look at this line again. Try running console.log(Math.random() * 100) a few times. Is what you get back an integer? If it were, what would be left for Math.floor to do on the next line?

// another name could be movieTime

// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
// This code works for normal positive number representing but for negative number and very big number it is not working No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Negative numbers are right. A very big number is fine though, try 999999 and see. Two things worth trying instead: 59, and a number with a decimal like 90.5. What does each one print, and would you show a time that way?

let age = 33;
age = age + 1;
console.log(`${age}`);
//We should use let if we want to change the value. No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your fix is right. In 2.js, 3.js and 4.js you also wrote down the message node printed, which is what this section asks for. What did node say here before you changed const to let?

@abdishakoor-dev abdishakoor-dev 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 Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants