Skip to content

Sheffield | 26-ITP-January | Martha Ogunbiyi | Sprint 1 | Coursework#1081

Open
marthak1 wants to merge 16 commits intoCodeYourFuture:mainfrom
marthak1:coursework/sprint-1
Open

Sheffield | 26-ITP-January | Martha Ogunbiyi | Sprint 1 | Coursework#1081
marthak1 wants to merge 16 commits intoCodeYourFuture:mainfrom
marthak1:coursework/sprint-1

Conversation

@marthak1
Copy link

@marthak1 marthak1 commented Feb 26, 2026

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

Changelist

  • Evaluated the programs using documentation provided
  • interpreted unfamiliar error messages such as SyntaxError, ReferenceError, & TypeError and explained why they occurred
  • Interpreted program with some syntax / operators / functions looking up unfamiliar syntax in documentation
  • explored the windows console tab

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@marthak1 marthak1 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 26, 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 Feb 26, 2026
@github-actions

This comment has been minimized.

@marthak1 marthak1 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 26, 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 Feb 26, 2026
@github-actions

This comment has been minimized.

@marthak1 marthak1 changed the title Sheffield | 26-ITP-jan | Martha Ogunbiyi | Sprint 1 | Structuring and Testing Data Sheffield | 26-ITP-jan | Martha Ogunbiyi | Sprint 1 | Course Work Feb 26, 2026
@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@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 Feb 26, 2026
@marthak1 marthak1 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed 📅 Sprint 1 Assigned during Sprint 1 of this module Module-Structuring-And-Testing-Data The name of the module. labels Feb 26, 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 Feb 26, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@marthak1 marthak1 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 26, 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 Feb 26, 2026
@marthak1 marthak1 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 26, 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 Feb 26, 2026
@marthak1 marthak1 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 26, 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 Feb 26, 2026
@marthak1 marthak1 added 📅 Sprint 1 Assigned during Sprint 1 of this module Module-Structuring-And-Testing-Data The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 26, 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 Feb 26, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@marthak1 marthak1 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 26, 2026
// Describe what line 3 is doing, in particular focus on what = is doing

/*
Line 3 is re-assigning the variable "count" with a new value that increases the previous value by 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Operation like count = count + 1 is very common in programming, and there is a programming term describing such operation.

Can you find out what one-word programming term describes the operation on line 3?

// Line 5-
// priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));
// ^^^
// SyntaxError: missing ) after argument list
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you give a more specific reason why the error occurs? (You didn't fix the error by adding a ). )

2. const penceStringWithoutTrailingP = This stores the substring of penceString by extracting all characters except the final p. It takes the substring from index 0 up to (but not including) the last character p, so "399p" becomes "399". This removes the unit symbol so only the numeric portion remains.
3. const paddedPenceNumberString= This stores the value of penceStringWithoutTrailingP, padded to a total length of 3 characters by adding leading zeros where necessary. This guarantees there are always enough digits to separate pounds and pence correctly.
4. const pounds= Stores the substring of paddedPenceNumberString from index 0 to the last 2 index. These leading digits represent the pound portion of the amount.
5. const pence= Extracts the final two digits of the padded string to represent the pence portion. padEnd(2, "0") ensures that the pence value always contains exactly two digits.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we expect this program to work as intended for any valid penceString if we deleted .padEnd(2, "0") from the code?
In other words, do we really need .padEnd(2, "0") in this script?

What is the return value of `prompt`?

What effect does calling the `prompt` function have?A modal appears with the "What is your name?" with an input field to enter your name. The input is then stored in the variable myName
What is the return value of `prompt`? My name stored in the variable myName
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the question is asking what return value can the caller expect from the function prompt()

  • When the user clicks the OK button
  • When the user clicks the Cancel button

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

Labels

Module-Structuring-And-Testing-Data The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants