python第七题怎么做啊?

2024-11-18 16:09:07
推荐回答(3个)
回答1:

import random

choices = [random.randint(1, 10) for i in range(10)]

negative = choices

for ix, value in enumerate(negative):

    if value > 3 and value < 8:

        negative[ix] = -value

print(negative)

回答2:

回答3:

用Python自带的TK库就可以实现哦