Check Divisibility

Complete the code on the editor to answer to the questions if 583 is divisible by 11 and 911 is divisible by 11.

Hint: Check the "modulo" operator

Test Cases

test is 911 divisible by 11 - Run Test

def test_is_911_divisible_by_11():
    assert is_911_divisible_by_11 is False

test is 583 divisible by 11 - Run Test

def test_is_583_divisible_by_11():
    assert is_583_divisible_by_11 is True

Solution 1

divisible_by_11 = 11

is_583_divisible_by_11 = None
is_911_divisible_by_11 = None

number_583 = 583

if number_583 % divisible_by_11 == 0:
    is_583_divisible_by_11 = True
else:
    is_583_divisible_by_11 = False


is_911_divisible_by_11 = None
number_911 = 911

if number_911 % divisible_by_11 == 0:
    is_911_divisible_by_11 = True
else:
    is_911_divisible_by_11 = False
divisible_by_11 = 11 is_583_divisible_by_11 = None is_911_divisible_by_11 = None number_583 = 583 # Remove square brackets and complete if statement condition if [YOUR_CODE]: is_583_divisible_by_11 = True else: is_583_divisible_by_11 = False is_911_divisible_by_11 = None number_911 = 911 # Remove square brackets and complete if statement condition if [YOUR_CODE]: is_911_divisible_by_11 = True else: is_911_divisible_by_11 = False