有些时候,分数需要伪造
但是又不能太假,并且分数还有个总分
要算出前面题目的分数

于是我就写了下边的脚本

import random

yi = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
er = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]
san = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
si = [4, 8, 12, 16, 20]
wu = [5, 10, 15, 20, 25, 30]

while (1):
    fen = input('请输入分数:')
    sum = 0
    while (sum != int(fen)):
        sum = 0
        for ti in range(0, 5):
            if ti == 0:
                tmp1 = yi[random.randint(0, len(yi)-1)]
                sum += tmp1
            if ti == 1:
                tmp2 = er[random.randint(0, len(er)-1)]
                sum += tmp2
            if ti == 2:
                tmp3 = san[random.randint(0, len(san)-1)]
                sum += tmp3
            if ti == 3:
                tmp4 = si[random.randint(0, len(si)-1)]
                sum += tmp4
            if ti == 4:
                tmp5 = wu[random.randint(0, len(wu)-1)]
                sum += tmp5
    print('********************')
    print('第一题分数:', tmp1)
    print('第二题分数:', tmp2)
    print('第三题分数:', tmp3)
    print('第四题分数:', tmp4)
    print('第五题分数:', tmp5)
    print('********************')

运行结果
python脚本运行结果.png