MCQs>IT & Programming>Symbian Platform Python>What is wrong with the following Python code? def showMaxFactor(num): count = num / 2 while count > 1: if num % count == 0: print 'Largest factor of %d is %d' % (num, count) break count -= 1 else: print num, 'is prime' for eachNum in range(10, 21): showMaxFactor(eachNum)
Symbian Platform Python MCQs
What is wrong with the following Python code? def showMaxFactor(num): count = num / 2 while count > 1: if num % count == 0: print "Largest factor of %d is %d" % (num, count) break count -= 1 else: print num, "is prime" for eachNum in range(10, 21): showMaxFactor(eachNum)
Answer
Correct Answer:
Explanation:
Note: This Question is unanswered, help us to find answer for this one