码迷,mamicode.com
首页 >  
搜索关键字:for、while循环    ( 3185个结果
猜数字游戏
#猜数字游戏while循环,if...elif判断的应用importrandom#引入专门生成随机数的一个库#从1到100之间随机取出一个数字教给变量secret(秘密数)mimishu=random.randint(10,1000)shurushu=0#用户输入的数字cishu=0#用户猜测的次数print("来玩个猜数字的游戏吧,你有6次机会哟")#这里用while循环,至
分类:其他好文   时间:2020-03-21 16:37:12    阅读次数:126
3-课后习题记录-就放这里了
# 1、 使用while循环输入1 2 3 4 5 6 8 9 10 count = 1 while count <= 10: if count != 7: print(count) count += 1 # 2、求1-100的和 count = 1 sum = 0 while count <=10 ...
分类:其他好文   时间:2020-03-20 00:36:22    阅读次数:58
python-while循环的练习题
# !/use/bin/env python# -*-conding:utf-8-*-#author:shanshan"""写代码a. 使用 while 循环实现输出 1,2,3,4,5, 7,8,9, 11,12b. 使用while 循环输出100-50,从大到小,如100,99,98…,到50时 ...
分类:编程语言   时间:2020-03-19 21:51:42    阅读次数:392
python的input和while循环
python的input和while使用一、Pythoninput()函数:获取用户输入的字符串Python3.x中input()函数接受一个标准输入数据,返回为string类型。Python2.x中input()相等于eval(raw_input(prompt)),用来获取控制台的输入。raw_input()将所有输入作为字符串看待,返回字符串类型。而input()在对待纯数字输入时具有自己的特
分类:编程语言   时间:2020-03-19 09:36:00    阅读次数:160
【java】已经学习的部分
1,java语法:基本数据类型,for-while循环,class结构 2,scf框架:和项目有关的 3,mvn基本命令:package负责打jar包,clean清除编译信息 4,spring-boot学习:学习如何启动web项目,学习如何调用json接口并返回到某个json结构体,学习schedu ...
分类:编程语言   时间:2020-03-17 15:33:04    阅读次数:65
python基础(二)
1、使用while循环输入1 2 3 4 5 6 ... 8 9 10 count = 1 while count <= 10: print(count) # count = count + 1 count += 1 2、使用while循环输入1 2 3 4 5 6 8 9 10 count = 1 ...
分类:编程语言   时间:2020-03-17 10:21:57    阅读次数:96
PHP 语法
// PHP 教程 // // // ////////////////////////////////////// 一、PHP 简介 PHP(全称:PHP:Hypertext Preprocessor,即"PHP:超文本预处理器") 是一种创建动态交互性站点的强有力的服务器端脚本语言。 【特点】: ...
分类:Web程序   时间:2020-03-16 19:17:46    阅读次数:74
Uncaught TypeError: Cannot read property 'cells' of undefined
<table border="1" width="50%" id="table"> <tr> <th>学号</th> <th>姓名</th> <th>操作</th> </tr> <tr> <td>xh001</td> <td>阮雌</td> <td><a href="javascript:;" on ...
分类:其他好文   时间:2020-03-16 14:45:41    阅读次数:84
while循环之continue...break用法
while循环 import random count = random.randint(0,10)#随机生成0~10之间数 i=0 while i<5: number = int(input("请输入")) if number<count: print("小了") elif number>coun ...
分类:其他好文   时间:2020-03-13 18:47:37    阅读次数:72
python之路
python之路 "01.深拷贝,浅拷贝与赋值符号的不同" "02.while循环和for循环" "03.数字类型介绍" "04.字符串及方法介绍" "05.基本数据类型之字典介绍" "06.基本数据类型之列表介绍 " "07.基本数据类型之元组介绍" ...
分类:编程语言   时间:2020-03-11 22:14:31    阅读次数:79
3185条   上一页 1 ... 23 24 25 26 27 ... 319 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!