搜索结果
查询Tags标签: winsB,共有 6条记录-
模拟排球赛
from random im probA = eval(input("请输入队伍A的能力值(0~1):"))probB = eval(input("请输入队伍B的能力值(0~1):"))n = eval(input("请输入需要模拟比赛的场次数:"))return probA, probB, n def printResult(n, winsA, winsB):funct…
2021/11/14 6:11:55 人评论 次浏览 -
模拟排球赛
from random im probA = eval(input("请输入队伍A的能力值(0~1):"))probB = eval(input("请输入队伍B的能力值(0~1):"))n = eval(input("请输入需要模拟比赛的场次数:"))return probA, probB, n def printResult(n, winsA, winsB):funct…
2021/11/14 6:11:55 人评论 次浏览 -
比赛模拟-乒乓球
from random import randomdef printIntro():print("学号:3012")print("这个程序模拟两个选手A和B的兵乓球比赛")print("程序运行需要A和B的能力值(以0到1之间的小数表示)")def getInputs():a = eval(input("请输入选手A的能力值(0…
2021/11/14 6:10:00 人评论 次浏览 -
比赛模拟-乒乓球
from random import randomdef printIntro():print("学号:3012")print("这个程序模拟两个选手A和B的兵乓球比赛")print("程序运行需要A和B的能力值(以0到1之间的小数表示)")def getInputs():a = eval(input("请输入选手A的能力值(0…
2021/11/14 6:10:00 人评论 次浏览 -
排球竞赛
from random import random def printInfo(): print(114) print(This program simulates a game between two) print(There are two players, A and B) print(Probability(a number between 0 and 1)is used) def getInputs(): a = eval(input(What is …
2021/11/14 6:09:49 人评论 次浏览 -
排球竞赛
from random import random def printInfo(): print(114) print(This program simulates a game between two) print(There are two players, A and B) print(Probability(a number between 0 and 1)is used) def getInputs(): a = eval(input(What is …
2021/11/14 6:09:49 人评论 次浏览