Help needed for Math 1 Skill Test

Hello, I’m working on the Math 1 Skill Test.

I’m not entirely sure what is meant by “write a calculation to test if the number is even”. I’ve tried finalResult/2; if a number is divisible by 2 it must be even yes?

Here is a link to my code

If I incorrectly posted, or my formatting/requirements is wrong, please let me know, this is my first post requesting help. Thank you in advance!

Hi there @Hassan_Garshasb!

As I said in the other thread, to do the even odd check, you need to use the modulo (%) operator. See if you can work out how to use this to check whether a number is even.

Also, I’m not sure the CodePen link is correct - it seems to link to an empty example. Can you send me the correct one? Thanks!

Hello! Thanks for your input! The modulo operator did indeed resolve my problem, I didn’t realize I was trying to find a remainder…

I apologize about the link rot, I didn’t link it to my file, rather I linked it to an empty file. Thanks for your help!

I apologize about the link rot, I didn’t link it to my file, rather I linked it to an empty file.

No problem at all; as long as you are happy with your result.

1 Like