Files
wehub-resource-sync dde272c4b8
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:53 +08:00

1.5 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
699c8e045ee7cb94ed2322d9 Challenge 218: Evenly Divisible 29 challenge-218

--description--

Given two integers, determine if you can evenly divide the first one by the second one.

--hints--

is_evenly_divisible(4, 2) should return True.

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertIs(is_evenly_divisible(4, 2), True)`)
}})

is_evenly_divisible(7, 3) should return False.

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertIs(is_evenly_divisible(7, 3), False)`)
}})

is_evenly_divisible(5, 10) should return False.

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertIs(is_evenly_divisible(5, 10), False)`)
}})

is_evenly_divisible(48, 6) should return True.

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertIs(is_evenly_divisible(48, 6), True)`)
}})

is_evenly_divisible(3186, 9) should return True.

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertIs(is_evenly_divisible(3186, 9), True)`)
}})

is_evenly_divisible(4192, 11) should return False.

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertIs(is_evenly_divisible(4192, 11), False)`)
}})

--seed--

--seed-contents--

def is_evenly_divisible(a, b):

    return a

--solutions--

def is_evenly_divisible(a, b):
    return a % b == 0