四月 14
list1 = []
sizeNum = int(input("Please input the size of matrix: "))

for i in range(sizeNum):
    valueNum = int(input("Please input the value: "))
    list1.append(valueNum)

print(list1)
四月 14
[训练] 蟒蛇 – 质数
ICON1 陈方安生 | ICON2 蟒蛇 | 图标4 04 14日, 2019| ICON1 9,592 意见 | ICON3评论 »
num = int(input("Please input a number: "))

for i in range(2, num):
    for j in range(2, i):
        if (i % j == 0):
            break
        
        if (i == j + 1):
            print(i)
四月 14
ans = 38

min = 0
max = 100

while(True):
    guess = int(input("Please input a number that between %d ~ %d : "%(min, max)))
    if (guess > ans):
        max = guess
    if (guess < ans):
        min = guess
    if (guess == ans):
        print("Bingo!!")
        break