再试一次
我正在尝试这样做,用户给出8个职业篮球队的名字,当被问到他们在nba的排名时,它会显示他们的位置,他们得到了多少圈。同时每8队倒换一次位置。也就是说,如果一个队是第一个选择,第八个队将在第九轮中第一个选择
nba = ""
count = 1
teams = []
while count < 9:
nba = input("enter nba team: ")
count = count + 1
teams.append(nba)
selection = input("how many rounds will this go to? ")
print("The team order is: ")
样本-
投入1:开拓者
投入2:湖人队
输入3:凯尔特人
输入4:热量
投入5:网络
投入6:勇士
输入7:cavs
输入8:微型飞行器
你要打多少回合?十一,
第一轮:开拓者
第二轮:湖人队
第三轮:凯尔特人
第四轮:热身赛
第五轮:蚊帐
第六轮:勇士队
第七轮:骑士队
第8轮:小牛队
第九轮:小牛队
第十轮:骑士队
第11轮:勇士队
等
抱歉,这有点让人困惑
你可以这样做:
因此,您的示例输出将是:
显然,此函数只是一个简单的示例。您可以更改它,以便
counter
由您的输入问题设置产生:
相关问题 更多 >
编程相关推荐