猜数字游戏.rar

  • PUDN用户
    了解作者
  • Python
    开发工具
  • 9KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2021-03-18 21:56
    上传日期
猜测数字的小游戏,可以打发你的闲暇时间,让你不再为空余时间的分配而烦恼
猜数字游戏.rar
  • 猜数字游戏.docx
    12.3KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/6268380b4c65f412597d4ef7/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6268380b4c65f412597d4ef7/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">Y="Y"</div><div class="t m0 x1 h3 y3 ff1 fs0 fc0 sc0 ls0 ws0">N="N"</div><div class="t m0 x1 h3 y4 ff1 fs0 fc0 sc0 ls0 ws0">count=1</div><div class="t m0 x1 h3 y5 ff1 fs0 fc0 sc0 ls0 ws0">import&#58895;random</div><div class="t m0 x1 h3 y6 ff1 fs0 fc0 sc0 ls0 ws0">trueage=random.randint(0,100)</div><div class="t m0 x1 h3 y7 ff1 fs0 fc0 sc0 ls0 ws0">#&#58895;trueage=18</div><div class="t m0 x1 h3 y8 ff1 fs0 fc0 sc0 ls0 ws0">while&#58895;count&lt;=3:</div><div class="t m0 x1 h4 y9 ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;age=int(input("<span class="ff2">&#32473;&#20320;&#19977;&#27425;&#26426;&#20250;&#29468;&#25105;&#30340;&#24180;&#40836;&#65288;</span>0-7<span class="_ _0"></span><span class="ff2">&#65289;&#65292;&#29468;&#20013;&#20102;&#23601;&#24110;&#20320;&#23454;&#29616;&#19977;&#20010;&#24895;&#26395;&#65306;</span>"))</div><div class="t m0 x1 h3 ya ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;if&#58895;trueage==age:</div><div class="t m0 x1 h4 yb ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;print(input("<span class="_ _0"></span><span class="ff2">&#23569;&#24180;&#65292;&#35828;&#20986;&#20320;&#30340;&#24895;&#26395;</span>:"))</div><div class="t m0 x1 h4 yc ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;print("<span class="ff2">&#12416;<span class="_ _0"></span>&#12426;</span>")</div><div class="t m0 x1 h3 yd ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;break</div><div class="t m0 x1 h3 ye ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;else:</div><div class="t m0 x1 h4 yf ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;print("<span class="ff2">&#21487;&#24796;&#21487;&#24796;</span>")</div><div class="t m0 x1 h3 y10 ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;if&#58895;c<span class="_ _0"></span>ount==3:</div><div class="t m0 x1 h4 y11 ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;<span class="_ _0"></span>&#58895;choice=input("<span class="ff2">&#23569;&#24180;&#65292;&#20877;&#35797;&#35797;&#21543;&#65288;</span>Y<span class="_ _1"></span>-<span class="ff2">&#32487;&#32493;&#65292;</span>N-<span class="ff2">&#36864;&#20986;</span>):")</div><div class="t m0 x1 h3 y12 ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;<span class="_ _0"></span>&#58895;print(choice)</div><div class="t m0 x1 h3 y13 ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;<span class="_ _0"></span>&#58895;if&#58895;choice==Y<span class="_ _1"></span>:</div><div class="t m0 x1 h3 y14 ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;<span class="_ _0"></span>&#58895;&#58895;&#58895;&#58895;&#58895;count=0</div><div class="t m0 x1 h3 y15 ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;<span class="_ _0"></span>&#58895;elif&#58895;choice==N:</div><div class="t m0 x1 h3 y16 ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;&#58895;<span class="_ _0"></span>&#58895;&#58895;&#58895;&#58895;&#58895;break</div><div class="t m0 x1 h3 y17 ff1 fs0 fc0 sc0 ls0 ws0">&#58895;&#58895;&#58895;&#58895;count+=1</div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐
    • 飞机大战小游戏python入门.zip
      飞机大战小游戏Python源码含图片素材,适合新手入门项目练习
    • Python中国象棋小游戏
      Python中国象棋小游戏,欢迎下载!
    • Python贪吃蛇小游戏
      Python的贪吃蛇小游戏,下载解压后打开index.py,点击右下角即可开始游戏!(需求:Python3环境、pygame、Windows 7 以上版本)
    • Python开发五子棋小游戏
      python中pygame模块开发的五子棋小游戏,实现功能:下棋,悔棋,重新开始,退出游戏,判赢,另附背景图片,背景音乐。
    • 嗷大喵快跑小游戏python
      一个简单的酷跑类游戏,以python+pygame库进行开发。游戏中一共有嗷大喵,恶龙,火焰,爆炸动画和果实(就是上方蓝色的矩形块)这几种精灵。在程序开始的时候我们可以看到有一个欢迎界面,界面上面还有一个按钮,当...
    • python小游戏
      python写的一个2048小游戏,涉及到pyhton的图形绘制,可用于新手练手。
    • python 滑雪小游戏
      基于python的一个滑雪小游戏,有图,有代码,可参考,适用于有一点点基础的python初学者。 内有6张人物形态图,1个得分图,一个障碍物图和一份代码。 用到了pygame库,可以做着玩玩。
    • python五子棋小游戏
      博客里面有代码,这个是可以运行的程序,代码也有比较详细的注释,看不懂的地方多看看,实在不行再私聊,谢谢
    • 小游戏python实现
      多类小游戏python实现(小鸟管道、扫雷、五子棋、俄罗斯方块等等小游戏
    • python 2048小游戏
      python初学者,自己写的一段2048小游戏,只是把主要部分写好了,可以看一看