generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 330
London | 25-ITP-Jan | Kayanat Suleman | Sprint 1 | Structuring and Testing Data #950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
KayanatSuleman
wants to merge
40
commits into
CodeYourFuture:main
Choose a base branch
from
KayanatSuleman:coursework/sprint-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
96d622c
:wq
KayanatSuleman 3bb281b
Adding in the code to satify the intials challenge
KayanatSuleman 1dc12f7
Adding in the explination of my solution
KayanatSuleman 1ef3a27
Updating const ext with the the relevant code
KayanatSuleman 5c23704
Committing an attempt to figure out the issue
KayanatSuleman 2f85b84
Committing solution for dir pathway
KayanatSuleman 96f9379
Committing solution for EXT
KayanatSuleman 8e18c54
Commiting the solution description
KayanatSuleman f29be14
Adding punctuation
KayanatSuleman c70429e
Logging the const num to terminal to understand the result
KayanatSuleman abee589
Experimenting with Math.Floor by logging the output of a random float…
KayanatSuleman 6d126ff
Experimenting with Math.random by logging the output within the terminal
KayanatSuleman 0e51060
Adding the explination of the solution for this activity
KayanatSuleman fb5e6ee
Commenting out the lines using the js syntax
KayanatSuleman 0448365
Updating the script with a potential solution
KayanatSuleman df44244
Adding in the explaination of the solution
KayanatSuleman 98566d0
Updating the code with the solution
KayanatSuleman 932aea5
Adding the prediction
KayanatSuleman 5a69444
Updating the solution with the correct code
KayanatSuleman 45f9953
Correcting the syntax
KayanatSuleman fb5cc26
Adding the explination of the solution
KayanatSuleman 9792b22
Fixing syntax issue for the priceAfteOneYear function
KayanatSuleman aa822ed
Updating question a) with the ans
KayanatSuleman 2acccaa
Updating question b) and c) with the ans
KayanatSuleman 71506f7
updating question d) with the ans
KayanatSuleman 276e42a
General clean up of the tasks, and correcting some spelling erros
KayanatSuleman 0ff5958
Updating some spelling errors
KayanatSuleman 50c9bab
Committing the ans to question a)
KayanatSuleman 1cd9a52
Commiting the ans for question b)
KayanatSuleman 40c1158
Committing the ans for c)
KayanatSuleman 78cefed
Commiting the ans to d)
KayanatSuleman b43117d
Committing the ans to e)
KayanatSuleman e7c4a5b
Committing ans for f)
KayanatSuleman 85cc2a9
Reviewing and updating spelling typo
KayanatSuleman 4f2663a
Committing the explination of the program as step 2
KayanatSuleman 40ddf44
Committing the explinati
KayanatSuleman 9d6da7a
Committing the explinati
KayanatSuleman 837e3ef
Committing the explanation of the program as step 5
KayanatSuleman 3ea132c
Committing the explanation of the program as step 6
KayanatSuleman 599ea52
correcting typos and making the explanation clearer
KayanatSuleman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| This is just an instruction for the first activity - but it is just for human consumption | ||
| We don't want the computer to run these 2 lines - how can we solve this problem? | ||
| //This is just an instruction for the first activity - but it is just for human consumption | ||
| //We don't want the computer to run these 2 lines - how can we solve this problem? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| // trying to create an age variable and then reassign the value by 1 | ||
|
|
||
| const age = 33; | ||
| let age = Math.floor(Math.random()); | ||
| age = age + 1; | ||
| console.log(age); | ||
| // Explaning the solution: Assigning age to a variable that is not constant - then utalising Math.Floor and Math.Random to assign age a whole random number. | ||
| // I then allow age to be added to 1 | ||
| // I then log to the console to verify the age. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| // Currently trying to print the string "I was born in Bolton" but it isn't working... | ||
| // what's the error ? | ||
|
|
||
| console.log(`I was born in ${cityOfBirth}`); | ||
| const cityOfBirth = "Bolton"; | ||
| console.log(`I was born in ${cityOfBirth}`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,12 @@ | ||
| const cardNumber = 4533787178994213; | ||
| const last4Digits = cardNumber.slice(-4); | ||
| const last4Digits = cardNumber.toString().slice(-4); | ||
|
|
||
| console.log(last4Digits); | ||
| // The last4Digits variable should store the last 4 digits of cardNumber | ||
| // However, the code isn't working | ||
| // Before running the code, make and explain a prediction about why the code won't work | ||
| // Then run the code and see what error it gives. | ||
| // Consider: Why does it give this error? Is this what I predicted? If not, what's different? | ||
| // Then try updating the expression last4Digits is assigned to, in order to get the correct value | ||
| // Prediction: The code may not work due to the const variable being an int. The slice method usually works on strings. | ||
| // Updating the const last4Digits with .toString() allowed the const cardNumber to convert from int to string and therefore the solution works as expected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| const 12HourClockTime = "20:53"; | ||
| const 24hourClockTime = "08:53"; | ||
| const twelveHourClockTime = "20:53"; | ||
| const twentyFourHourClockTime = "08:53"; | ||
|
|
||
| console.log(twelveHourClockTime); | ||
| console.log(twentyFourHourClockTime); | ||
| //Explaining the solution: The issue is that the syntax to assign a const var needs to be a string. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.