For this challenge you will use an algorithm to find all the factors of a given number.
Your algorithm will be based on the INPUT – PROCESS – OUTPUT model:
- INPUT: Ask the user to enter a number,
- PROCESS: Identify all the factors of this number,
- OUTPUT: Display all the factors of this number.
Task 1: Python Code
Your task is to implement your algorithm using Python code.
Task 2: Test Plan
|Test #||Type of Test||Input Values||Expected Output||Actual Output|
Task 3: Extension Task: Prime Number?
How could you tweak this code to detect if a number is a prime number or not. If a number is a prime number your algorithm should display a message saying so.
Task 4: Extension Task: Simplifying a Fraction
Complete the following two challenges: