Lv.1
萌新一枚
签名:编程
在 【Python求助】dalao帮我看看为啥不行 中回复
完整专家整理代码为:
import random
n = 0
def ask():
if (input() == 'yes') :
print('so come on!')
ask()
elif (input('so can you beat me?') == 'no') :
print('bye bye!')
ask()
else :
print('please tell no or yes')
ask()
input('What`s your name?')
print('Welcome to my first works.')
ask()
print('first,you must calculate the result.')
x = random.randint(1, 100)
y = random.randint(1, 100)
if (input(x+'and'+y+'is?') != int(x+y)) :
print('you fail.')
else :
print('next.')
x = random.randint(1, 10000)
y = random.randint(1, 10000)
if (input(x+'and'+y+'is?') != int(x+y)) :
print('you fail.')
else :
print('well,you win!')2019-01-19T19:20:44 点赞:1
在 【求助】Python大佬帮忙看看 中回复
正确的专家解析代码:
#Caesar Cipher
SYMBOLS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
MAX_KEY_SIZE = len(SYMBOLS)
def getmMode():
while True:
print('Do you wish to encrypt or decrypt a message?')
mode = input().lower()
if mode in ['encrypt','e','decrypt','d']:
return mode
else:
print('Enter either "encrypt" or "e" or "decrypt" or "d".')
def getMessage():
print('Enter your message:')
return input()
def getKey():
key = 0
while True:
print('Enter the key number (1-%s)' % (MAX_KEY_SIZE))
key = int(input())
if(key >= 1 and key <=MAX_KEY_SIZE):
return key
def getTanslatedMessage(mode,message,key):
if mode[0] == 'd':
key = -key
transleted = ' '
for symbol in message:
symbolIndex = find(symbol)
if symbolIndex == -1: #Symbol not find in SYMBOLS.
#Just add this symbol without any change.
translated += symbol
else:
#Encrypt or decrypt.
symbolIndex += key
if symbolIndex >= len(SYMBOLS):
symbolIndex -=len(SYMBOLS)
elif symbolIndex < 0:
symbolIndex += len(SYMBOLS)
translated + SYMBOLS[symbolIndex]
return translated
mode = getMode()
message = getMessage()
key = getkey()
print('Your translated text is:')
print(getTanslatedMessage(mode,message,key))2019-01-19T19:27:39 点赞:0
在 【python库】欢迎使用Ryan库! 中回复
研发日期:2019.1.19
研发员:Ryan袁奥
研发技术:https://lab.codemao.cn/community/167882
特别感谢人:bLockTheBlOcK块块
2019-01-19T21:22:58 点赞:0
在 【1月30日22点小鱼干】听说:活动喵最近在找人?是你吗? 中回复
1. https://shequ.codemao.cn/work/4喵7411 【编程之星培养计划】毒液爬爬
2. https://shequ.codemao.cn/work/6226234 【转载】几何拼图
3. https://shequ.codemao.cn/work/6253788 【计算器】次方计算器
4. https://shequ.codemao.cn/work/喵56917 送给python乐园的贺卡
5. https://shequ.codemao.cn/work/喵56561 星球探索器
6. https://shequ.codemao.cn/work/6509069 鼠标躲避
7. https://shequ.codemao.cn/work/4359657 【编程之星培养计划】纸飞机大冒险-难度版
8. https://shequ.codemao.cn/work/2018821 【Ryan新闻】第一期
9. https://shequ.codemao.cn/work/4076615 【编程之星培养计划】王校长吃热狗
10. https://shequ.codemao.cn/work/4295069 失落的魔盒
11. https://shequ.codemao.cn/work/喵56561 【开源版】星球探索器
12. https://shequ.codemao.cn/work/1329113 网购佳能照相机
13. https://shequ.codemao.cn/work/5082982 【鹿精灵】鹿精灵系列游戏
14. https://shequ.codemao.cn/work/2273489 猜一猜
15. https://shequ.codemao.cn/work/3701399 数学奥秘探索器
16. https://shequ.codemao.cn/work/1395376 安卓手机模拟器
17. https://shequ.codemao.cn/work/1385826 QQ中毒测试
18. https://shequ.codemao.cn/work/2242958 奇幻游乐园
19. https://shequ.codemao.cn/work/1359586 游戏大庆典
20. https://shequ.codemao.cn/work/1876681 数学奥秘探索器
21. https://shequ.codemao.cn/work/1383312 【贺卡专辑】2018新年贺卡
22. https://shequ.codemao.cn/work/2262621 考生加油——等差数列塔
23. https://shequ.codemao.cn/work/2278092 精选帖子生成器
24. https://shequ.codemao.cn/work/4420454 【编程之星培养计划】机器人飞飞飞
25. https://shequ.codemao.cn/work/2277636 等差数列塔(scratch版)
26. https://shequ.codemao.cn/work/1390702 编程猫建议表格
27. https://shequ.codemao.cn/work/2277694 等差数列求和公式
28. https://shequ.codemao.cn/work/1361139 二维码识别器
29. https://shequ.codemao.cn/work/4715496 【编程之星培养计划】熊猫爬爬
30. https://shequ.codemao.cn/work/1383730 【贺卡专辑】2018除夕贺卡
31. https://shequ.codemao.cn/work/1393965 微信小游戏:跳一跳
32. https://shequ.codemao.cn/work/1412188 惊喜
33. https://shequ.codemao.cn/work/3222537 编程猫捉迷藏
34. https://shequ.codemao.cn/work/1392519 幸运数字选一选
35. https://shequ.codemao.cn/work/1078762 套餐抽奖
36. https://shequ.codemao.cn/work/1390246 点菜
37. https://shequ.codemao.cn/work/1394991 windows10模拟器
38. https://shequ.codemao.cn/work/1487299 小天才电话手表模拟器
39. https://shequ.codemao.cn/work/5108206 毒液爬爬-录制版
40. https://shequ.codemao.cn/work/5402365 弹幕球躲躲
41. https://shequ.codemao.cn/work/2439223 输出1000的所有因数之和
42. https://shequ.codemao.cn/work/1395273 WindowsXp模拟器
43. https://shequ.codemao.cn/work/1078404 鹿王奔跑
44. https://shequ.codemao.cn/work/1395135 windows8模拟器
45. https://shequ.codemao.cn/work/5983676 竹鼠求生记
46. https://shequ.codemao.cn/work/1875910 母亲节贺卡
47. https://shequ.codemao.cn/work/1369761 人气PK(编程猫VS猫老祖)
48. https://shequ.codemao.cn/work/1384528 【贺卡专辑】20喵年初一(春节)贺卡
49. https://shequ.codemao.cn/work/1078570 飞碟飞行
50. https://shequ.codemao.cn/work/1487051 过马路
51. https://shequ.codemao.cn/work/1385071 【贺卡专辑】拜年贺卡(给大家)
52. https://shequ.codemao.cn/work/3691883 【故事台】第一期
53. https://shequ.codemao.cn/work/1078735 忍者飞镖
54. https://shequ.codemao.cn/work/5442781 源翱版图片查看器
55. https://shequ.codemao.cn/work/1078666 你画我猜
56. https://shequ.codemao.cn/work/1281385 八分音符
57. https://shequ.codemao.cn/work/2279163 【编程一小时】幸运数字
58. https://shequ.codemao.cn/work/1369562 【编程一小时】智能管家机器人
59. https://shequ.codemao.cn/work/4107279 ☞◎物理大碰撞◎☜
60. https://shequ.codemao.cn/work/4065889 【编程一小时】角色侦测
61. https://shequ.codemao.cn/work/1330657 QQ
62. https://shequ.codemao.cn/work/1326512 原来这个倒成了有钱的象征
63. https://shequ.codemao.cn/work/4715005 郑州市第二届创意编程大赛试题-小学组
喵. https://shequ.codemao.cn/work/5957022 魔鬼猫的大哥之路
65. https://shequ.codemao.cn/work/2254167 【50M版】奇幻游乐园
66. https://shequ.codemao.cn/work/1385136 【贺卡专辑】2018生日贺卡
67. https://shequ.codemao.cn/work/1078430 火球球移动
68. https://shequ.codemao.cn/work/1394757 测试
69. https://shequ.codemao.cn/work/2289065 多功能操作器(内测)
70. https://shequ.codemao.cn/work/3222158 【编程一小时】超准报时器
71. ......
2019-01-25T20:48:35 点赞:4
在 【1月30日22点小鱼干】听说:活动喵最近在找人?是你吗? 中回复
71. https://shequ.codemao.cn/work/5886208 英语听力器
72. https://shequ.codemao.cn/work/4714903 【编程一小时】画笔高级用法
73. https://shequ.codemao.cn/work/2272708 NOC初赛证书查询器
74. https://shequ.codemao.cn/work/3222443 电脑性能测试
75. https://shequ.codemao.cn/work/2358947 联机测试(1)
76. https://shequ.codemao.cn/work/1369166 Ryan袁奥聊天室
77. https://shequ.codemao.cn/work/1359536 共享单车
78. https://shequ.codemao.cn/work/3836521 万圣节一起来搞怪
79. https://shequ.codemao.cn/work/5931566 圣诞节贺卡
80. https://shequ.codemao.cn/work/4228277 电脑严重卡机测试
81. https://shequ.codemao.cn/work/3226692 云列表
82. https://shequ.codemao.cn/work/1411963 小黄人·宣传片
83. https://shequ.codemao.cn/work/1315163 喵
84. https://shequ.codemao.cn/work/1313929 赛车V1.0
85. https://shequ.codemao.cn/work/1319132 电梯
86. https://shequ.codemao.cn/work/5539525 【编程之星培养计划】弹幕系统尝试V1.1
87. https://shequ.codemao.cn/work/5442663 雷电猴大大
88. https://shequ.codemao.cn/work/1078383 控制阿短
89. https://shequ.codemao.cn/work/1327755 飞船被黑洞的引力吸了进去
90. https://shequ.codemao.cn/work/32220喵 弹力球
91. https://shequ.codemao.cn/work/1123244 Flaaybird
92. https://shequ.codemao.cn/work/5456317 乱之抽取
93. https://shequ.codemao.cn/work/5416265 【每日精选】随机抽取
94. https://shequ.codemao.cn/work/2306008 3D雷电猴
95. https://shequ.codemao.cn/work/1459571 统计人数
96. https://shequ.codemao.cn/work/1390473 点菜
97. https://shequ.codemao.cn/work/1368816 无聊的电风扇
98. https://shequ.codemao.cn/work/6016186 【计算器】百分数转分数
99. https://shequ.codemao.cn/work/3220969 植物大战僵尸
100. https://shequ.codemao.cn/work/2268561 监控喵系统
101. https://shequ.codemao.cn/work/1282868 瓶子闯关
102. https://shequ.codemao.cn/work/1385927 【贺卡专辑】20喵年初三(贴赤日·赤喵)贺卡
103. https://shequ.codemao.cn/work/1383301 喵喵手机版
104. https://shequ.codemao.cn/work/1314558 红包
105. https://shequ.codemao.cn/work/1282746 音乐播放器
106. https://shequ.codemao.cn/work/1259651 元旦战斗
107. https://shequ.codemao.cn/work/4065522 【编程一小时】距离侦测
108. https://shequ.codemao.cn/work/2260428 摄像头
109. https://shequ.codemao.cn/work/1383288 编程猫接糖果手机按键版
110. https://shequ.codemao.cn/work/1325493 自动画图
111. https://shequ.codemao.cn/work/1314607 红绿灯
112. https://shequ.codemao.cn/work/3220223 逃离龙穴
113. https://shequ.codemao.cn/work/1955156 视频弹幕
114. https://shequ.codemao.cn/work/14167喵 少院士(有广告)
115. https://shequ.codemao.cn/work/1407592 ofo密码破解神器
116. https://shequ.codemao.cn/work/1369492 OX翻译助手
117. https://shequ.codemao.cn/work/1369028 寻宝藏
118. https://shequ.codemao.cn/work/1385559 糖果猪
119. https://shequ.codemao.cn/work/1371002 七彩之歌
120. https://shequ.codemao.cn/work/1348166 多功能闹钟
121. https://shequ.codemao.cn/work/1329502 浏览器
122. https://shequ.codemao.cn/work/1022909 声控飞机大战(手机版)
123. https://shequ.codemao.cn/work/3222261 问答游戏
124. https://shequ.codemao.cn/work/2283591 突然减速
126. https://shequ.codemao.cn/work/1319379 二位数计算器
127. https://shequ.codemao.cn/work/1365458 彩虹笔
131. https://shequ.codemao.cn/work/1355530 卖报纸模拟系统
132. https://shequ.codemao.cn/work/1359669 tls小游戏宣传页
133. https://shequ.codemao.cn/work/1323418 大炮轰轰轰
134. https://shequ.codemao.cn/work/1323107 球球躲避战
135. https://shequ.codemao.cn/work/1078491 蝙蝠闯关
136. https://shequ.codemao.cn/work/5886900 【2018圣诞】多人创作版圣诞贺卡-2018
137. https://shequ.codemao.cn/work/2749113 【编程一小时】快乐的弹球
138. ......
2019-01-29T20:35:46 点赞:5