Question: Write a Python Program To find if the number is divisible by 2,3,5 Take input as a number Enter a number: Display one of the
Write a Python Program
To find if the number is divisible by 2,3,5
Take input as a number
Enter a number:
Display one of the below correct statement as output:
- Number is divisible by 2
- Number is divisible by 3
- Number is divisible by 5
- Number is divisible by 2,3
- Number is divisible by 3,5
- Number is divisible by 2,5
- Number is divisible by 2,3,5
- Number is not divisible by 2,3,5
Example:
If you enter 6: It should display Number is divisible by 2,3
If you enter 10: It should display Number is divisible by 2,5
If you enter 15: It should display Number is divisible by 3,5
If you enter 300: It should display Number is divisible by 2,3,5
If you enter 19: It should display Number is not divisible by 2,3,5
Hint: Use else if (elif and logical operators)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
