Problem Description: You, the head of Department of Security, recently received a top-secret information that a group of terrorists is planning to tr....
分类:
其他好文 时间:
2015-08-13 19:42:15
阅读次数:
142
我们先贴上之前的代码,回顾一下功能
import random
secret=random.randint(1,100)#生成随机数
#print (secret)
time=6#猜数字的次数
guess=0#输入的数字
minNum=0#最小随机数
maxNum=100#最大随机数
print("---------欢迎来到猜数字的地方,请开始---------")
while guess!=s...
分类:
编程语言 时间:
2015-08-13 07:48:05
阅读次数:
161
上次我们的游戏加入了条件判断,但是它只能够给用户猜一次,非常难猜中
所以,我们这节课在游戏里面加入循环,让用户多猜几次
先上原来的代码:
print("---------欢迎来到猜数字的地方,请开始---------")#输出提示
guess=int(input("*数字区间0-100,请输入你猜的数字:"))#读取输入,然后赋值
print(guess)#打印输入
secret=18
if...
分类:
编程语言 时间:
2015-08-12 13:20:05
阅读次数:
296
第一个程序实际上只是打印一些东西到屏幕上面,下面我们引入一个游戏,使得课程更加有趣。
第二个程序是一个小游戏-猜数字,我先把代码贴上
import random
secret=random.randint(1,100)#生成随机数
#print (secret)
time=6#猜数字的次数
guess=0#输入的数字
minNum=0#最小随机数
maxNum=100#最大随机数
prin...
分类:
编程语言 时间:
2015-08-10 13:36:42
阅读次数:
137
'basic', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'components' => [ 'request' => [ // !!! insert a secret k...
分类:
移动开发 时间:
2015-08-08 11:58:57
阅读次数:
132
BreakingTheCodeProblem StatementYou have been given a secret mission where you must break the enemy's code. You have already figured out that they enc...
分类:
其他好文 时间:
2015-08-06 22:15:46
阅读次数:
413
每个实体一个表。
多张表应该在一起使用,将多个表的记录连接起来。
create table teacher(
id int primary key auto_increment,
name varchar(10),
gender enum('male','female','secret')
)engine innodb character set utf8;
insert into teac...
分类:
数据库 时间:
2015-08-04 00:38:21
阅读次数:
136
题目传送门 1 /* 2 构造+暴力:按照题目意思,只要10次加1就变回原来的数字,暴力枚举所有数字,string大法好! 3 */ 4 /************************************************ 5 Author :Running_Ti...
分类:
其他好文 时间:
2015-08-03 14:20:47
阅读次数:
170
安装zabbix软件包1、下载安装包zabbix-2.4.5.tar2、创建账户groupaddzabbixuseradd-gzabbixzabbix3、创建zabbix数据库rpm安装mysql相关软件包; servicemysqlstart启动mysql; mysql-uroot-p“.mysql_secret“中保存密码; mysql>setpassword=password(’你的密码’)mysql&g..
分类:
其他好文 时间:
2015-08-02 23:36:59
阅读次数:
180
A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Ea...
分类:
其他好文 时间:
2015-08-02 21:29:51
阅读次数:
128