Latest web development tutorials

Python includes exercises 81

Python 100 Li Python 100 Li

Title: 809 * 800 * ?? = ?? double-digit + 9 + 1 * ?? ?? which represented 8 * ?? result of double-digit, 9 * ?? results 3 digits. ?? Representatives seeking double-digit, and the results after 809 * ??.

Program Analysis: None.

Source Code:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

a = 809
for i in range(10,100):
    b = i * a + 1
    if b >= 1000 and b <= 10000 and 8 * i < 100 and 9 * i >= 100:
        print b,'/',i,' = 809 * ',i,' + ', b % i

The above example output is:

9709 / 12  = 809 *  12  +  1

Python 100 Li Python 100 Li