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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!