Python para impacientes

Python como usar o is_divisible

January 04, 2020

Checks if the first numeric argument is divisible by the second one.

Use the modulo operator (%) to check if the remainder is equal to 0.

def is_divisible(dividend, divisor):
  return dividend % divisor == 0
is_divisible(6, 3) # True

Acesse a Referência original 1: Acesse a Referência original 2: