Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

Conversation

AkramIzedi
Copy link

Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in HOW_TO_MARK.md in the root of this repository

Your Details

  • Your Name:
  • Your City:
  • Your Slack Name:

Homework Details

  • Module:
  • Week:

Notes

  • What did you find easy?

  • What did you find hard?

  • What do you still not understand?

  • Any other notes?

@@ -1,16 +1,17 @@
// There are syntax errors in this code - can you fix it to pass the tests?

function addNumbers(a b c) {
function addNumbers(a,b,c) {
return a + b + c;
}

Choose a reason for hiding this comment

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

Comment: These three first questions has the same code as mine

return;
function multiply(a,b,c) {
let times= a*b*c;
return times ;
}

Choose a reason for hiding this comment

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

Consider: This is how I wrote. Just different names.
function multiply(a, b, c) {
const answer = a * b * c;
return answer;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

@softacoder have you used this button in the Github UI?
image

@@ -2,15 +2,20 @@
function getRandomNumber() {
return Math.random() * 10;
}
//Math.random() The Math.random() static method returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range //

Choose a reason for hiding this comment

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

Comment: Well done. You written the code as I have on these three questions.

function calculateSalesTax(productPrice) {
let salesTaxForProduct = (productPrice + ((productPrice * 20) / 100))
return salesTaxForProduct;
};

Choose a reason for hiding this comment

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

Comment: Well done. Here is another way to consider
function calculateSalesTax(sales) {
let tax = sales * 0.2;
let total = sales + tax;
return total;
}

let salesTaxForProduct = (productPrice + ((productPrice * 20) / 100)).toFixed(2);
let showTaxAmount = "£".concat(salesTaxForProduct)
return showTaxAmount;
};

Choose a reason for hiding this comment

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

Comment: Interesting solution. It works?
Mine:
function addTaxAndFormatCurrency(sales) {
return "£" + calculateSalesTax(sales).toFixed(2);
}

@softacoder
Copy link

softacoder commented Mar 1, 2023 via email

@AkramIzedi AkramIzedi requested a review from Shadi38 March 29, 2023 09:17
@AkramIzedi
Copy link
Author

.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants