def odd_or_even(n: int) -> bool:
odd = 0
even = 0
i = 0
while n >= 1:
j = n % 10
if j % 2 == 1:
odd += j
else:
even += j
n = n // 10
return odd >= even
assert odd_or_even(12) is False
assert odd_or_even(123) is True
assert odd_or_even(112) is True
def odd_or_even(n: int) -> bool:
evens = [int(i) for i in str(n) if int(i) % 2 == 0]
odds = [int(i) for i in str(n) if int(i) % 2 != 0]
return sum(odds) >= sum(evens)
assert odd_or_even(12) is False
assert odd_or_even(123) is True
assert odd_or_even(112) is True
def odd_or_even(n: int) -> bool:
oddSum = sum([int(i) for i in list(str(n)) if int(i) % 2 == 0])
evenSum = sum([int(i) for i in list(str(n)) if int(i) % 2 != 0])
return True if evenSum>=oddSum else False
assert odd_or_even(12) is False
assert odd_or_even(123) is True
assert odd_or_even(112) is True
def odd_or_even(n: int) -> bool:
x=0
y=0
for i in str(n):
if int(i)%2==0:
x+=int(i)
else:
y+=int(i)
if y>=x:
return True
else:
return False
assert odd_or_even(12) is False
assert odd_or_even(123) is True
assert odd_or_even(112) is True
def odd_or_even(n: int) -> bool:
sum1 = sum([int(i) for i in str(n) if int(i) % 2 == 1])
sum2 = sum([int(i) for i in str(n) if int(i) % 2 == 0])
if sum1 >= sum2:
return True
else:
return False
assert odd_or_even(12) is False
assert odd_or_even(123) is True
assert odd_or_even(112) is True
def odd_or_even(n: int) -> bool:
odd_sum = sum([int(i) for i in str(n) if int(i) % 2 == 1])
if odd_sum >= sum(int(j) for j in str(n)) - odd_sum:
return True
return False
assert odd_or_even(12) is False
assert odd_or_even(123) is True
assert odd_or_even(112) is True