Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
1.3. Primality Testing
This section
Practice test
12 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
4 cards from this lesson. Good the night before a test.
Try these first
- 1.
Define a prime number.
Hint
Think about what factors a number can have.
- 2.
Is 4 a prime number? Why or why not?
Hint
Remember the definition of a prime number!
- 3.
What defines a prime number?
- Only divisible by 1 and itself
- Divisible by multiple numbers
- Equal to 1
Hint
Recall the definition discussed.
- 4.
True or False: The GCD of 20 and 30 is 10.
- True
- False
Hint
Think about the factors of each number.
- 5.
Determine if 103 is a prime number using the naive testing algorithm. Demonstrate your process.
Hint
Remember to make your checks only go up to the square root.
- 6.
Explain how changing the input number affects the running time of the naive primality test.
Hint
Consider how each added bit may relate to the number of checks required.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
2 more questions available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting