diff --git a/Practical 2/q12_find_factors.py b/Practical 2/q12_find_factors.py index 5a42489..b36ad6e 100644 --- a/Practical 2/q12_find_factors.py +++ b/Practical 2/q12_find_factors.py @@ -1,13 +1,13 @@ # Finding the factors of an integer # by Yiyang 29/01/18 - +# gisc: avoid single letter variables and underscore prefix _ in identifier names N = int(input()) i = 2 # i is the factor & the iterator _first = True # for the printing format while (N >= i): if (N % i == 0): - N /= i + N /= i # use integer divisor // in Python 3 if _first == True: print(i, end='') _first = False @@ -16,4 +16,4 @@ else: i += 1 -print('.') \ No newline at end of file +print('.')