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

Conversation

Afsha10
Copy link

@Afsha10 Afsha10 commented Feb 28, 2023

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?

return "You Can Register";
} else if (age >= 90) {
return "You Don't Need To Register";
} else {
Copy link

@SeyoungJoo SeyoungJoo Mar 1, 2023

Choose a reason for hiding this comment

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

The last statement that returns false is not required. recommend to delete the last else statement as the first 3 conditions already covers all the cases you can have.

function canRegister(age) {
  if (age <= 12) {
    return "You Are Too Young To Register";
  } else if (age > 12 && age < 90) {
    return "You Can Register";
  } else {
    return "You Don't Need To Register";

@SeyoungJoo SeyoungJoo requested a review from seyyednavid March 1, 2023 18:31
return price2;
} else price1;
}

Choose a reason for hiding this comment

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

well done Afsha .

Copy link
Author

Choose a reason for hiding this comment

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

Thank you Navid!

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, good job 👍
It's good that you're thinking about the case where price1 is equal to price2.

@Afsha10 Afsha10 added the review requested I would like a mentor to review my PR label Mar 21, 2023
NOTE:Only make edits inside the function
*/

Copy link
Contributor

Choose a reason for hiding this comment

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

Both of these look good to me 👍

To be acceptable, two conditions must be fulfilled
1. the user should be 18 or older
2. the user must be logged in
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice 👍
Can you think about how you can make this code even shorter? Do you need the if statement? Can you do it with only a return statement?

*/
function printOddNumbers(limit) {}


Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect 👍

1
)
*/

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good 👍

Using a loop, complete the function below so it returns the factorial of the number being passed in.
*/

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like there's a lot going on here 😄
For problems like this, I would suggest we take a step back from the code - and think about some of the Problem Solving techniques we covered in the workshop in class. Maybe start by thinking about how you would normally do something like this (without a computer) and try drawing it out on a whiteboard or paper. This may give you some ideas about how to do this in code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well done for attempting this though! It's a tough one!

Copy link
Author

Choose a reason for hiding this comment

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

I wrote pseudo code and watched your videos on function and looping and managed to do this on my own in less 30 minutes. Thank you, Barath!

@moneyinthesky
Copy link
Contributor

moneyinthesky commented Mar 23, 2023

Good job on this coursework @Afsha10 👍

@moneyinthesky moneyinthesky added the reviewed A mentor has reviewed this code label Mar 23, 2023
Completed the extra part on my own after writing the pseudocode and watching Barath's function and looping videos.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

review requested I would like a mentor to review my PR reviewed A mentor has reviewed this code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants