Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions