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

Why is it not necessary to give Hepatitis A vaccine to children in some cases?
5(x-y)-5(y+x) pls help with this
Complete the sentence with the best verb. ___ the silver and black fan just need new batteries, or is it broken? Do or Does?
8. Which of the following is the function of pn junction semiconductor device A. it transforms a direct voltage to AC voltage B. It steps up an AC​
an article bought for rs. 800 is sold for 5/4 of the cost price.Find the profit percentage.​
help? can someone help
When pendulum move upward…… energy change into ……… energy​
Dtermine the Range and domain defined by R = {(x-1), (x+2); x € (2,3,4,5)}​
The capacity of a cylindrical water tank is 539 litres. If its height is 1.4 meter then find the radius of the base.​
Question 14 of 45 How did World War II change the global balance of power? A. It spread global power almost equally among the countries that joined the United N