代码
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 5 21:58:56 2021
@author: li
"""
import random
shaizi = [1,2,3,4,5,6]
import random
def Computer_count(num,dianshu,computer_shaizi):
Bool_list = [True,False]
num = int(num)
dianshu = int(dianshu )
computer_label = random.choices(Bool_list)
if computer_label[0] == True:
return True, num,dianshu
computer_num = num + 1
computer_dianshu = random.choices([1,2,3,4,5,6])[0]
print("电脑报的数为:",computer_num ,"个", computer_dianshu)
return computer_label[0] , computer_num, computer_dianshu
computer_label = False
my_label = False
computer_shaizi = random.choices(shaizi,k=5)
my_shaizi = random.choices(shaizi,k=5)
while not(computer_label | my_label):
print("你的筛子是",my_shaizi)
print("请开始报数:")
num &#