Commit 00956784 by BellCodeEditor

save project

parent 7fc48c90
Showing with 15 additions and 15 deletions
import random
while True:
a=input("请出!")
b=["石头","剪刀","布"]
c=random.choice(b)
if a in b:
if a==c:
print("平局")
elif (a=="布"and c=="石头")or (a=="石头"and c=="剪刀")or (a=="剪刀"and c=="布"):
print("我赢了")
else:
print("计算机赢了")
else:
print("输入错误")
\ No newline at end of file
username = "python"
userpassword = "123456"
while True:
name = input("请输入用户名:")
password = input("请输入密码:")
if name == username and password == userpassword:
print("登录成功!")
break
if name!=username:
print("用户名错误!请重新输入")
continue
if password!=userpassword:
print("用密码错误!请重新输入")
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