Skip to content

kiboschool/wdf-week-7-exercises

Repository files navigation

Week 7 Exercises

This week, the mandatory exercises are:

  1. Prime Checker:In this exercise, you would write a program to determine if a given number is a prime number. You would also need to check if the given input is a number.

  2. Palindrome Checker: In this exercise, you would write a program to determine if a given input is a palindrome.

  3. Three-digit Armstrong: In this exercise, you would write a program to determine if a given number is an Armstrong number. You would also need to check if the given input is a three-digit number in the first place.

  4. Math Helper:In this exercise you will write a program to help calculate different math functions. This exercise combines the other three exercises in this week, namely, the Prime Checker, Palindrome Checker and the Three-digit Armstrong. Given a single interface, a user can specify which of the three math functions to be computed and the appropriate answer would be generated.

To solve each exercise, navigate to the exercise folder and follow the instructions in the README.md file.

Testing

You can use the automated tests to check that your work is valid.

  1. Navigate your terminal to the parent exercise folder for the week (not the individual exercise).

  2. Install the project dependencies by running pnpm install

  3. To run all tests for the week, run pnpm run test

  4. To run the test for a specific exercise, you need to specify the path to the exercise folder, run pnpm run test exercise-folder. For example, run pnpm run test chicken-peanut-stew

If your solution has all the required elements it should say something like:

 PASS  ./html-elements.test.js
  The recipe page has the required HTML elements
    ✓ uses at least one heading element (50 ms)
    ✓ uses at least three heading elements (18 ms)
    ✓ uses at least two heading elements (10 ms)
    ✓ uses at least one image element (5 ms)
    ✓ index.html is a valid html doc (193 ms)

Test Suites: 1 passed, 1 total
Tests:       5 passed, 5 total
Snapshots:   0 total
Time:        2.104 s
Ran all test suites.

If it does not pass one of the tests, you should get some feedback about what is wrong or missing in your solution.

Submission

In order to get credit for your project, you must:

  • push your code to Github Classroom
  • submit your work in Gradescope
  • submit your project in Woolf

Note that this assignment is automatically graded and you will see your grade shortly after submitting to Gradescope. You have unlimited number of attempts, therefore you are enouraged to modify your work and resubmit as much as possible, before the due date.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •