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

22. What was a finding of the Supreme Court in the Dred Scott case? Slavery was illegal. Slaves were citizens. Slavery was a choice each state could make. Slave
what is the difference between genus and phylum
Lobbyists today are people who generally a. work within the governmental process to affect policies. b. work illegally to get their group's needs met. c. use un
How did the Nazis separate the Jews during the holocaust?
compare and contrast potential energy and kinetic energy
Trying to help my nephew with math been so long I forget how to do it . Arrange the numbers in increasing order. 8.08, 8.081, 8.09, 8.008
what are four equivalent expressions for 4 (2+7p)
at marble middle school,35 percent of the students are 6th graders,32 percent are 7th graders,and the rest are 8th graders What percent are 8th graders?
Folded membranes are an advantage to a cell because ?
What is the stem and leaf plot