Commit be4d55b4 by BellCodeEditor

save project

parent cd4c771d
Showing with 52 additions and 12 deletions
student1={"语文":100,"数学":100,"英语":100}
student2={"语文":99,"数学":99,"英语":99}
student3={"语文":98,"数学":98,"英语":98}
score={"悟空":student1,"小贝":student2,"诺依":student3}
while True:
name=input("请输入姓名:")
if name in score:
info_score=score[name]
print("**"*20)
for k,v in info_score.items():
print(k,v)
print("**"*20)
else:
print("**"*20)
print("输入错误")
print("**"*20)
\ No newline at end of file
import turtle
len=100
screen=turtle. Screen()
print("玩家出"+player) screen.bgcolor("pink")
list["剪刀"+"石头"+"布"] pen=turtle.Pen()
computer=random.choice(list) pen.pensize(5)
print("计算机出了:"+cumputer) pen.penup()
if (player=="剪刀"and computer=="布")or(player=="布"and computer=="石头")or(player=="石头"andcomputer=="剪刀"): pen.goto(100,-100)
print("玩家赢了") pen.pencolor('red')
else: pen.write("春晓\n春眠不觉晓\n处处闻啼鸟\n夜来风雨声\n花落知多少",font=("Times",20,'normal'))
print("玩家输了") pen.goto(-50,-100)
\ No newline at end of file pen.pendown()
pen.left(45)
pen.forward(len)
pen.circle(50,180)
pen.right(90)
pen.circle(50,180)
pen.forward(len)
pen.hideturtle()
turtle.done()
\ No newline at end of file
name="abc"
mima="12345"
while True:
name2=input("请输入用户名:")
mima2=input("请输入密码:")
if name2=name and mima2=mima:
print("登录成功")
if name2!=name and mima2=mima:
print("用户名错误")
if name2=name and mima2!=mima:
print("密码错误")
if name2!=name and mima2!=mima:
print("密码和用户名错误")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment