We've moved away from repl.it for coding exercises. Check out the new exercises on Coding Rooms with automated submissions.
Login to your Udemy course and head over to the link below to get the sign up link:
Prime numbers are numbers that can only be cleanly divided by itself and 1.
https://en.wikipedia.org/wiki/Prime_number
You need to write a function that checks whether if the number passed into it is a prime number or not.
e.g. 2 is a prime number because it's only divisible by 1 and 2.
But 4 is not a prime number because you can divide it by 1, 2 or 4.
Here are the numbers up to 100, prime numbers are highlighted in yellow:
73
It's a prime number.
75
It's not a prime number.
- Remember the modulus:
https://stackoverflow.com/questions/4432208/what-is-the-result-of-in-python
-
Make sure you name your function/parameters the same as when it's called on the last line of code.
-
Use the same wording as the Example Outputs to make sure the tests pass.
Before checking the solution, try copy-pasting your code into this repl:
https://repl.it/@appbrewery/day-8-2-test-your-code
This repl includes my testing code that will check if your code meets this assignment's objectives.