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

Noah is training for a swim meet and swims 500 meters each day. How many kilometers does does Noah swim in a week if he trains every day
Can you go deaf by inhaling too hard?
how many types of nucleotides are present in DNA
Someone relying on divergent thinking would answer _____ to the query "what can you do with a pencil?"
the greatest baroque church musician (composer) wasA. Henry PurcellB. Johann Sebastian BachC. Jacopo PeriD. Claudio MonteverdiI think its Bach.
Burning does the following A) Takes up oxygen B) Produces oxygen C) Does both
The only political system that could guarantee the cooperation between the legislative and executive branch is
In an experiment, who are those people not exposed to a particular experience? control group experimental group field study
Name two things that would be different on our planet if we did not have a magnetic field.
Why might scientists who study changes of state build models showing the arrangement of particles in a substance?