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

how many milliliters are in 0.063 L?
Which number sentence is true?
The density of gold is 19.3g/cm3. What is the mass of 11.3 cm3 of gold?
6. 5x + 2y = -3 3x + 3y = 9
Elia rode her bicycle from her house to the beach at a constant speed of 18 kilometers per hour, and then rode from the beach to the park at a constant speed of
which expression is the same as 2^-3
Determine if the graph shows two quantities that vary directly. If possible, determine the constant of proportionality. Explain your reasoning.
the area of a 12 cm wide rectangle 252 cm squared what is its length. Please show how you got the answer I am really trying to understand this!
Write an equation of the line passing through each of the following pairs of points. a (−10, 4), (2, −5)
write a letter to your friend in another school giving him three reasons why your school has been excelling in academic work​