kakkuzhiyilron kakkuzhiyilron
  • 15-01-2021
  • Computers and Technology
contestada

write a python program to accept a number and check whether it is divisible by 4 or not​

Respuesta :

tonb
tonb tonb
  • 15-01-2021

Answer:

number = int(input("Enter number: "))

if (number % 4):

 print("{} is not divisible by 4".format(number))

else:

 print("{} is divisible by 4".format(number))

Explanation:

If the %4 operation returns a non-zero number, there is a remainder and thus the number is not divisable by 4.

Answer Link

Otras preguntas

What monomer is made up of glycerol and another molecule?
Which sentence best describes most of the playhouses of Shakespeare's time? A. They were fancy buildings attached to royal residences and palaces. B.
Compare and contrast how wind and glaciers abrade rock.
Twenty less than a number is more than twice the same number . Step by step to get the answer
What is the purpose of rearranging a sentence
If a bag of chips says it contains four servings, and each serving is 160 calories, what would be the best way to include them in your diet?
What are the values of a, b, and c in the quadratic equation –2x2 + 4x – 3 = 0?
2. In what ways did the olmec most clearly influence both maya and the aztecs? Select all that apply a. Construction of pyramid shaped temples b.Organization of
Find the lcm of the pair of numbers. 6 and 30
Solve the equation step by step. List each step, along with the property you used during that step. -5 x 1 X 11 X 4