RosettaCodeData/Task/Flow-control-structures/Python/flow-control-structures-1.py
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

10 lines
215 B
Python

# Search for an odd factor of a using brute force:
for i in range(n):
if (n%2) == 0:
continue
if (n%i) == 0:
result = i
break
else:
result = None
print "No odd factors found"