math - Python Dividing number by 99 and then checking if it is equal to number b par 2 digits -


i trying write program first of checks if can number number b swapping 2 digits. below code designed start @ 53150220288 , check if possible reach number 537163806382 changing 2 digits. trying change 2 digits of number 537163806382 new numbers multiples of 99. output them text file. writing program me maths competition.

f = open('blank.txt', 'w') = 53150220288 b = 537163806382 b = str(b) c = 0 while <= 1000000000:     in range(len(b)):         if b[i] == a[i]:             c = c         else:             c = c + 1     if c == 2:         = str(a)         print(a, file=f)     else:         c = 0         = int(a)         = + 99  f.close() 

problem above code outputs absolutely nothing! don't know why?

your program never enters while loop:

a =       53150220288 while <= 1000000000: 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -