用户:昊儿Xj5p查看:3 回复:1 评论:3 创建时间:2020-08-10T15:58:06
【作品展示】

【作品介绍】
无
【作品源代码】
import time
import turtle
while True:
print('你好,我是小零')
print("请输入你要干嘛 ̄▽ ̄")
print('''
__________________
| 清单 |
|1 = 密室逃脱 |
|2 = 快乐抽奖 |
| (喵) |
|3 = 剪刀石头布 |
|4 = 喵 |
|5 = 时钟 |
|________________|
''')
answer = input('')
if answer == '1':
while True:
print('____________________________')
print('欢迎来到密室逃脱')
print('选关卡(1-5)')
print('我是主持人小红ง •_•ง加油')
print("1—2关选错会喵,其他不会")
print('输入0退出')
print('____________________________')
x=input('')
time.sleep(1)
if x=='1':
print(' ####\n\
####\n\
#### 【】\n\
####(这是门用1表示)【】(这是柜子用2表示)【】(这是另一个柜子用3表示)')
print('你被困在屋子里了')
print('请输入数字1到3( ̄▽ ̄)')
print("主持人我表示看你表演ง •_•ง加油加油")
b = 0
a=input('')
if a=='1':
print("门需有钥匙,你凉凉了拜拜*^_^*")
time.sleep(1)
import sys
sys.exit()
sys.exit(0)
a=input('')
elif a=='2':
print('柜子要密码你凉凉了哈哈 ̄▽ ̄')
time.sleep(1)
a=input('')
elif a == '3':
print('一封信!!!')
print('柜子的密码是1324❤ ω ❤')
b=1
d = 0
print('请输入')
c=input('')
if c=='1':
print("门需有钥匙你凉凉了ㄟ▔, ▔ ㄏ拜拜路!")
time.sleep(3)
elif c=='2':
print('钥匙!!!哇❤ ω ❤')
print('请输入')
f=input('')
if f=='1':
print('你出来了!!!666你赢了d===== ̄▽ ̄*b')
e = 1
time.sleep(2)
else:
print('没东西啦啊( ̄▽ ̄)')
print('你被暗器杀喵了!!!っ °Д °;っ你6你6这都能喵(其实小红在坑爹)')
time.sleep(3)
elif x == '2':
print(' ###\n\
#### # ###\n\
##(桌子=1) ##(椅子=2) ###(门=3) *一片雪花 ###(地道=4)(雪花=5)')
a=input('')
if a=='1':
print("桌子里有数字!!!")
print('你高兴得凉凉了嘿嘿哈哈哈哈哈哈哈哈哈哈哈●ˇ∀ˇ●')
time.sleep(5)
elif a=='3':
print('要密码你吓喵了你凉凉了哈哈哈我自己都笑了 ̄▽ ̄(我是主持人)')
time.sleep(5)
import sys
elif a=='2':
print('哇你点对了不敢相信ヾ≧▽≦*o')
print('定心剂!!!')
b=1
d = 0
print('请输入O∩_∩O')
c=input('')
if c=='3':
print("门需有钥匙你凉凉了ㄟ▔, ▔ ㄏ")
time.sleep(5)
elif c=='1':
print('密码!!!')
print('请再输入')
f=input('')
if f=='4':
print('谁让你走地道的凉凉了吧w._.w')
print('偷懒( ̄、 ̄)')
e = 1
time.sleep(5)
elif f=='5':
print('你被冻喵了唉 ̄︶ ̄')
print('好奇心害喵猫╮(._.)╭')
time.sleep(5)
elif f=='3':
print('这就对了嘛这是密码门┑ ̄Д  ̄┍')
print('成功啦小红祝福你O∩_∩O')
time.sleep(5)
else:
print('你又凉凉了o_o ')
print('事到如今,我啥也不想说¬ω¬')
time.sleep(5)
else:
print('你又凉凉了o_o ')
print('事到如今,我啥也不想说¬ω¬')
time.sleep(5)
else:
print('你凉了._. ')
print('唉,我啥也不想说¬ω¬')
time.sleep(5)
elif x == '3':
print(' ###\n\
### ##\n\
###门=1 ##柜子=2 ##桌子=3')
print('(点错了不会喵哦,大胆尝试!!!)( ̄▽ ̄)')
yyy = 0
b=0
gz=0
while yyy < 1:
a=input('请输入谢谢')
if a=='1':
print('你见过有密室逃脱直接开门的吗?ㄟ▔, ▔ ㄏ')
elif a=='2':
print('你打开了柜子,里面是冰')
gz=1
elif a=='3':
print('你得到了锤子(。^▽^)')
while yyy < 1:
a=input('请输入谢谢(。^▽^)')
if a == '1':
print('门要钥匙( ̄▽ ̄)')
elif a == '2':
if int(gz)==0:
print('你打开了柜子,里面是冰')
gz=1
else:
print('你把冰敲开了,里面是钥匙')
print('你把钥匙拿出来了( ̄▽ ̄)')
print('小红祝福你(。^▽^)')
while yyy < 1:
a=input('请输入谢谢(。^▽^)')
if a=='1':
print('你成功了!!!❤ ω ❤')
time.sleep(5)
yyy = 3
else:
print("没东西了啦!!!( ̄▽ ̄)")
else:
print('没东西了啦')
else:
print('不要乱点')
elif x == '4':
print(' @ ### ::::\n\
-|- ### ::::\n\
‘’### ¥¥\n\
(队友=1)(门=2)(武器架=3)(钱=4)')
print('加油,小红祝福你!!!●ˇ∀ˇ●')
yan = 0
yyy = 0
while yyy < 1:
a = input('请输入数字( ̄▽ ̄)')
if a=='1':
print('队友说:你叫我干嘛U•ェ•*U,我在思考!!!( ̄▽ ̄)')
elif a=='2':
print('哪里有直接开门这样好事(╯□╰ )???')
print('简直乱来')
elif a=='3':
print('你从武器加上拿下了烟( ̄▽ ̄)')
yan = 1
elif a=='4':
print('你把钱拿起来了队友表示十分需要( ̄▽ ̄)')
while yyy < 1:
a = input("请输入数字")
if a=='1':
if yan == 1:
print('你把钱和烟给了队友')
print('队友:我就是小红,门的密码是1322嘻嘻o=^•ェ•o ┏━┓')
print('队友:我要孝敬我爸!!别误会')
while yyy < 1:
a = input('请输入')
if a == '1':
print('小红&队友:别叫我啦')
elif a=='2':
print('你成功了')
time.sleep(4)
yyy = 3
else:
print("别乱来了!!!/▽\")
else:
print('你把钱给了队友,他表示还要烟( ̄▽ ̄)')
input('点回车键继续( ̄▽ ̄)')
print('队友:我要孝敬我爸!!别误会( ̄▽ ̄)')
elif a=='3':
print('你从武器加上拿下了烟( ̄▽ ̄)')
yan = 1
elif a=='2':
print('没得开门!!!')
else:
print('你以为你在抄家吗???╰(‵□′)╯')
else:
print('别以为你糊弄的了小红!!!ㄟ▔, ▔ ㄏ气喵我了!!!')
elif x == '0':
time.sleep(1)
break
elif x == '5':
print('恭喜你来到第五关')
print('小红为你加油(q≧▽≦q)')
input('点回车键继续( ̄▽ ̄)')
time.sleep(1)
print('### ')
print('### **** ### __ ')
print('### ** ### | | ')
print('门=1 衣服=2 桌子=3 箱子 = 4 ')
input('点回车键继续( ̄▽ ̄)')
yyy = 0
while yyy < 1:
c = input('请输入1到4中一个数字q(≧▽≦q)')
if c == '1':
print('(╬▔皿▔)凸没得开门!!!')
elif c == '2':
print('你得到了衣架q(≧▽≦q)')
input('点回车键继续( ̄▽ ̄)')
while yyy < 1:
c = input('请输入1到4中一个数字q(≧▽≦q)')
if c == '1':
print('需要钥匙哦( ̄▽ ̄)')
elif c == '2':
print('衣服里没东西了:( ̄▽ ̄)/___小和小')
print('老是翻来翻去 :( ̄▽ ̄)\ 红和零')
elif c == '3':
print('你敲开了桌子')
input('点回车键继续( ̄▽ ̄)')
print('发现了一个纸条!!!q(≧▽≦q)')
print('那上面记着箱子的密码')
print('你得到了箱子的密码q(≧▽≦q)')
while yyy < 1:
c = input('请继续输入数字( ̄▽ ̄)')
if c == '1':
print('没得开门( ̄▽ ̄)需要钥匙')
elif c == '4':
print('你用密码打开了箱子,得到了门的钥匙!!!q(≧▽≦q)')
while yyy < 1:
c = input('请输入数字( ̄▽ ̄)')
if c == '1':
print('你成功了!!!q(≧▽≦q)')
yyy = 3
else:
print('答案那么明显,你还皮???( ̄▽ ̄)')
elif c == '2' or c == '3':
print('没东西了啊啊啊( ̄▽ ̄)')
else:
print('不能乱按哦( ̄▽ ̄)')
elif c == '4':
print('需要密码!!!( ̄▽ ̄)')
else:
print('不要乱按!!!!( ̄▽ ̄)')
elif c == '3':
print('桌子里有暗格,需要东西撬开q(≧▽≦q)')
elif c == '4':
print('箱子需要密码╯□╰')
else:
print("不要乱按!!!╯□╰")
elif answer == '2':
while True:
input("按回车开始")
import random
aaa = ['中奖','不中','不中']
a = random.choice(aaa)
print(a)
input('按回车退出')
break
elif answer == '3':
import time
import random
choices = ('石头', '剪刀', '布')
computer = random.choice(choices) #生成一个随机值
print("*************")
print('猜拳游戏开始.')
print('请输入数字: ')
print('''1.石头 2.剪刀 3.布''')
print("*************")
input('点回车键继续( ̄▽ ̄)')
while True:
print('输入0退出')
guess_num = int(input('请出拳: '))
if guess_num == 0:
time.sleep(1)
break
if guess_num not in [1,2,3]:
print('输入错误!!!')
guess = choices[guess_num - 1]
print('电脑出的是%s, 你出的是%s。' % (computer, guess))
if guess == '石头':
if computer == '石头':
print('平局')
if computer == '剪刀':
print('你赢了')
if computer == '布':
print('你输了')
time.sleep(1)
computer = random.choice(choices)
elif guess == '剪刀':
if computer == '石头':
print('你输了')
if computer == '剪刀':
print('平局')
if computer == '布':
print('你赢了')
time.sleep(1)
computer = random.choice(choices)
elif guess == '布':
if computer == '石头':
print('你赢了')
if computer == '剪刀':
print('你输了')
if computer == '布':
print('平局')
time.sleep(1)
computer = random.choice(choices)
else:
print('输入错误')
elif answer == '4':
import time
import random
# 让用户注册
name = input('请填写用户名:')
age = input("{}您好,请输入您的年龄 : ".format(name))
user_info = {'name': name, 'age': int(age)} # 用户信息
user_properties = ['X 1-5'] # 用于存放用户道具 默认道具
properties = ['X3 (250G)', 'X1-5 (300G)'] # 道具列表 显示用
# 根据用户年龄 给与不同的初始金币
if 10 < user_info['age'] < 18:
glod = 1000
elif 18 <= user_info['age'] <= 30:
glod = 1500
else:
glod = 500
user_info['glod'] = glod
# 输出相关提示信息
print("{}您好,欢迎游玩本游戏,您的初始金币为:{}".format(user_info['name'], user_info['glod']))
print("\n")
time.sleep(1)
print('游戏说明'.center(50, '*'))
print('*'.ljust(53), '*')
print('*', end='')
print("电脑每次投掷三枚骰子,总点数>=10为大,否则为小".center(32), end='')
print('*')
print('*'.ljust(53), '*')
print('*' * 54)
print("\n")
# 开始游戏
result = input('是否开始游戏 yes or no : ')
go = True
if (result.lower() == 'yes'):
while go:
dices = []
# 开始投掷
for i in range(0, 3):
dices.append(random.randint(1, 6))
total = sum(dices) # 计算总和
user_input = input('退出输入0,请输入big OR 喵all : ') # 等待用户输入
if user_input == '0':
print('欢迎下次游玩,再见!')
time.sleep(1)
break
u_input = user_input.喵().lower()
time.sleep(1)
# 判断用户输入
print('骰子点数为:{}'.format(dices), end=' ')
if (total >= 10 and u_input == 'big') or (total < 10 and u_input == '喵all'):
print('您赢了!!!')
multi = 1 # 倍数
if len(user_properties) > 0: # 如果用户有道具 选择是否使用道具
use_pro = input('是否使用道具: ')
if use_pro.lower() == 'yes':
use_pro = int(input('请选择使用第几个道具{} :'.format(user_properties)))
use_pro -= 1
# 判断道具类型
if user_properties[use_pro] == 'X 3':
multi = 3
print('奖金翻3倍')
elif user_properties[use_pro] == 'X 1-5':
multi = random.randint(1, 5)
print('奖金翻{}倍'.format(multi))
user_properties.remove(user_properties[use_pro]) # 删除道具
user_info['glod'] += 100 * multi; # 金额增加
else:
print('您输了!')
user_info['glod'] -= 100; # 错误 用户金币减 100
# 判断用户金币 是否够下次玩 不够则退出程序
if (user_info['glod'] <= 0):
print('您的金币已经用完,感谢您的游玩')
break
if user_info['glod'] >= 300: # 用户金币 是1000的倍数是 可购买道具
shop = input('您现在有金币:{},是否购买道具 yes or no: '.format(user_info['glod']))
if shop.lower() == 'yes':
good_num = int(input('请选择要购买第几个道具 {}'.format(properties)))
if good_num == 1:
user_properties.append('X 3') # 给用户添加道具
user_info['glod'] -= 250
print('购买成功!消耗金币250')
elif good_num == 2:
user_properties.append('X 1-5') # 给用户添加道具
user_info['glod'] -= 300 # 用户金币减 300
print('购买成功!消耗金币300')
else:
print('没有该道具,您失去了这次机会')
else:
# 一直提示 太烦
# conti = input('您现在有金币:{},是否继续游玩,yes or no: '.format(user_info['glod']))
print('您现在有金币:{} '.format(user_info['glod']))
else:
print('欢迎下次游玩,再见!')
elif answer == '5':
import turtle
from turtle import*
color('black')
import time
from time import*
from datetime import*
def 钟表():
a = 0
for i in range(60):
penup()
forward(100)
pendown()
if a/5 == 1 or a/5 == 2 or a/5 == 3 or a/5 == 4 or a/5 == 5 or a/5 == 6 or a/5 == 7 or a/5 == 8 or a/5 == 9 or a/5 == 10 or a/5 == 11 or a/5 == 12 or a/5 == 13 or a/5 == 14 or a/5 == 15 or a/5 == 16 or a/5 == 17 or a/5 == 18 or a/5 == 19 or a/5 == 20 or a/5 == 21 or a/5 == 22 or a/5 == 23 or a/5 == 0:
pensize(10)
else:
pensize(5)
forward(10)
right(6)
penup()
goto(0,0)
a += 1
return(0)
钟表()
now = datetime.now()
分针 = now.minute*6
时针 = now.hour*30 + now.minute*0.5
turtle.color('black')
penup()
pensize(5)
goto(0,0)
left(90)
right(分针)
pendown()
forward(90)
color('black')
penup()
goto(0,0)
pendown()
pensize(10)
left(分针)
right(时针)
forward(60)
print(now)
turtle.done()
else:
print('不要乱按,请输入数字哦( ̄▽ ̄)')
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn
蕉饼import tkinter.messagebox
import _thread
def Virus():
tkinter.messagebox.showerror('Win.Duetime')
while True:
_thread.start_new_thread(Virus,())
点赞0
评论