Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started