Question: Write a program DivisionCheck in python that reads an integer and prints whether it is divisible by only 2 or divisible by only 3 or

Write a program DivisionCheck in python that reads an integer and prints whether it is divisible by only 2 or divisible by only 3 or divisible by both or divisible by neither 2 nor 3.

Additional Information

a) Use remainder operator

b) Use input function to receive user input

c) Get the user input by displaying the message "Enter an integer: "

d) Assume that user inputs only integers.

Expected 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!