VBS 猜数游戏

2018-11-09  21:19:11

by xutao

 msgbox "The Swami" ,,"Game"
msgbox "The system will give a integer in the range of 1 to 100 randomly, and you are allowed to guess a integer one time! Less tries, more luck" , ,"Rule"
while = '无限循环 dim tryTime '尝试次数
tryTime = dim n
randomize '初始化随机种子,不然每次都会一样
n = int(rnd*) int input
input = int(inputbox("Guess it")) '注意:while语句的语法是: while condition ... wend (不加then) while n <> input
tryTime = tryTime+
if input>n then
input = int(inputbox("Too big! Try again!"))
else
input = int(inputbox("Too small! Try again!"))
end if
wend if tryTime= then
msgbox "Genius! Buy a lottery ticket quickly!"
elseif tryTime= then
msgbox ""
elseif tryTime= then
msgbox "NB"
elseif tryTime= then
msgbox "Cool!"
elseif tryTime= then
msgbox "Good!"
elseif tryTime= then
msgbox "Not Bad!"
elseif tryTime= then
msgbox "Unfortuntate!"
elseif tryTime= then
msgbox "Idiot!"
else
msgbox "SB!"
end if if msgbox("ReTry?",vbOK)<> then
msgbox "Bye!"
wscript.quit
end if wend

VBS猜数游戏的更多相关文章

  1. 【BZOJ 1594】 [Usaco2008 Jan]猜数游戏 (二分+并查集)

    1594: [Usaco2008 Jan]猜数游戏 Description 为了提高自己低得可怜的智商,奶牛们设计了一个新的猜数游戏,来锻炼她们的逻辑推理能力. 游戏开始前,一头指定的奶牛会在牛棚后面 ...

  2. usaco 猜数游戏

    Description 为了提高智商,锻炼思维能力,奶牛设计了一个猜数游戏.游戏开始前,贝西会在牛棚后面摆上N个数字.所有数字排成一条直线,按次序从1到N编号.每个数字在1到10^9之间,没有两个数字 ...

  3. (一)Python之猜数游戏

    猜数游戏由简如深的编码学习过程: 3次机会: print('------------------我爱鱼C工作室------------------')count=0while count < 3 ...

  4. 猜数游戏-flag的运用

    package my;import java.util.Scanner;public class MyJava {        public static void main(String[] ar ...

  5. Java课程设计——猜数游戏(201521123111 陈伟泽)

    Java课程设计--猜数游戏(201521123111 陈伟泽) 1.团队课程设计博客链接 博客作业--猜数游戏 2.个人负责模块或任务说明 Answer:一些基础界面的构造,排行榜的构造,用文件录入 ...

  6. JAVA课程设计 猜数游戏 团队

    团队名称,成员介绍 名称: 猜数游戏 成员: 网络1514 201521123086 周颖强 网络1514 201521123087蒋勃超 项目git地址 git.oschina.net/jbc113 ...

  7. BZOJ 2222: [Cqoi2006]猜数游戏【神奇的做法,傻逼题,猜结论】

    2222: [Cqoi2006]猜数游戏 Time Limit: 20 Sec  Memory Limit: 259 MBSubmit: 604  Solved: 260[Submit][Status ...

  8. 从scratch到python——猜数游戏

    ` 之前讲解了从scratch到python,基于python turtle库的实现,讲解了用scratch和python turtle绘图的实现,以及让小猫动起来和当角色被单击的例子. 本节课讲继续 ...

  9. 【BZOJ1594】[Usaco2008 Jan]猜数游戏 二分答案+并查集

    [BZOJ1594][Usaco2008 Jan]猜数游戏 Description 为了提高自己低得可怜的智商,奶牛们设计了一个新的猜数游戏,来锻炼她们的逻辑推理能力. 游戏开始前,一头指定的奶牛会在 ...

随机推荐

  1. udp_connect函数

    #include <netdb.h> #include <stdlib.h> #include <unistd.h> #include <string.h&g ...

  2. pyqt5-顶层窗口特定操作-图标和标题和不透明度

    图标: setWindowIcon(QIcon("resource/header_icon.png"))     设置窗口图标 icon=QIcon(r'大象.png')      ...

  3. nginx 基于uwsgi部署Django

    1.安装nginx yum install -y nginx(需要epel源) 2.安装环境 可以考虑使用虚拟化环境,本处不再使用 3.安装uwsgi yum groupinstall "D ...

  4. Coursera, Deep Learning 1, Neural Networks and Deep Learning - week4, Deep Neural Networks

    Deep Neural Network Getting your matrix dimention right 选hyper-pamameter 完全是凭经验 补充阅读: cost 函数的计算公式: ...

  5. 最好用的 IntelliJ 插件 Top 10

    最好用的 IntelliJ 插件 Top 10 https://my.oschina.net/didispace/blog/1583238

  6. scrapy模拟用户登录

    scrapy框架编写模拟用户登录的三种方式: 方式一:携带cookie登录,携带cookie一般请求的url为登录后的页面,获取cookie信息应在登录后的页面获取,cookie参数应转成字典形式 # ...

  7. struts2简单入门

    框架是什么,框架有什么作用 框架 实现部分功能的代码. 作用 控制请求和响应. 相对于WEB项目的执行流程 struts2项目搭建流程 配置web.xml 配置前端控制器[核心控制器] ---一个fi ...

  8. 【Git】Git常见错误

    错误1.fatal: refusing to merge unrelated histories 致命的:拒绝合并不相关的历史 原因:比如我本地分支是V1.0,我现在想要合并远程master分支上的内 ...

  9. eclipse使用异常An error has occurred.see error log for more details eclipse

    eclipse使用异常An error has occurred.see error log for more details eclipse 解决Eclipse,MyEclipse出现An erro ...

  10. xadmin插件开发

    参考:http://blog.csdn.net/qq_15682489/article/details/70174784 项目中新添加的organization模块需要在toolbar中添加“课表详细 ...