From c6c185c0720332bb629593a13634367e9b4490d0 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 16 Nov 2024 09:47:07 +0800 Subject: [PATCH] save project --- jk.py | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/jk.py b/jk.py index a727694..0813838 100644 --- a/jk.py +++ b/jk.py @@ -1,21 +1,7 @@ -player=input("玩家出拳:") -print("玩家出的是"+player) - -import random -a=["石头","剪刀","布"] -computer=(random.choice(a)) -print("计算机出的是"+computer) -if player in a: - if player==computer: - print("平局") - elif player=="石头"and computer=="剪刀": - print("恭喜,你赢了") - elif player=="剪刀"and computer=="布": - print("恭喜,你赢了") - elif player=="布"and computer=="石头": - print("恭喜你,你赢了") - else: - print("很遗憾,人机赢了") -else: - print("输入错误") +s1={小王:{'语文':100,'数学':114,'英语':98}} +s2={小小:{'语文':99,'数学':100,'英语':90}} +ss={'小王':s1,'小小':s2} +inso = score[name] +for m,n in ss.items(): + print(m,n) -- libgit2 0.25.0