Question: Write a block of Python code that prompts the user to enter an integer. If the number is evenly divisible by 2, output to the
Write a block of Python code that prompts the user to enter an integer. If the number is evenly divisible by 2, output to the screen This number is divisible by 2. If the number is evenly divisible by 3, output to the screen This number is divisible by 3. However, if the number is evenly divisible by both 2 and 3, output to the screen This number is divisible by both 2 and 3. If the number is not divisible by 2 or 3, then output to the screen This number is not divisible by 2 or 3. Note: there should be only one line of output on the screen after the input.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
