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:

  1. Number is divisible by 2
  2. Number is divisible by 3
  3. Number is divisible by 5
  4. Number is divisible by 2,3
  5. Number is divisible by 3,5
  6. Number is divisible by 2,5
  7. Number is divisible by 2,3,5
  8. 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

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!