Write a program DivisionCheckpy that reads an integer and pr
Solution
input_num = int(input(\"Enter a integer: \"))
 if input_num % 2 ==0 and input_num % 3 == 0:
 print(\"Number \"+str(input_num)+\" is divisible by both 2 and 3\")
 elif input_num % 2 == 0 and input_num % 3 != 0:
 print(\"Number \"+str(input_num)+\" is divisible by 2 but not 3\")
 elif input_num % 3 == 0 and input_num % 2 != 0:
 print(\"Number \"+str(input_num)+\" is divisible by 3 but not 2\")
 else:
 print(\"Number \"+str(input_num)+\" is divisible by neither by 2 nor by 3\")
Output:
sh-4.3$ python3 main.py
Enter a integer: 5
Number 5 is divisible by neither by 2 nor by 3
sh-4.3$ python3 main.py
Enter a integer: 12
Number 12 is divisible by both 2 and 3
sh-4.3$ python3 main.py
Enter a integer: 9
Number 9 is divisible by 3 but not 2
sh-4.3$ python3 main.py
Enter a integer: 4
Number 4 is divisible by 2 but not 3

