While21. An integer N (> 0) is given. By using integer division and taking the remainder of the division operations, determine whether there are odd digits in the record of the number N. If there are, output TRUE; if not, print FALSE.

Solution in Python 3:

import random

N = random.randrange(1,1000)
print("N = ",N)
q = N
i = 0
flag = False
while q >= 1:
i += 1
r = q % 10
print(i," - ",r)
if r%2 == 1:
flag = True
break
q = int(q/10)

print(flag)