Question: In Python write a program that test and display if a number enter is divisible by 2 and/or 3. Use the correct operator Prompt the

In Python write a program that test and display if a number enter is divisible by 2 and/or 3.

Use the correct operator

Prompt the user to enter a number

Display the following output:

Enter an integer: 5

Number 5 is divisible neither by 2 nor by 3

Enter an integer: 12

Number 12 is divisible by both 2 and 3

Enter an integer: 9

Number 9 is divisible by 3 but not 2

Enter an integer: 4

Number 4 is divisible by both 2 but not 3

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!