码迷,mamicode.com
首页 >  
搜索关键字:python2.7 tab自动补全 readline    ( 2135个结果
python urllib、urllib2模块讲解
1、urllib模块 1.urllib.urlopen(url[,data[,proxies]]) 打开一个url的方法,返回一个文件对象,然后可以进行类似文件对象的操作。本例试着打开google urlopen返回对象提供方法: - read() , readline() ,readlines() ...
分类:编程语言   时间:2016-04-22 11:55:43    阅读次数:248
输入身份证号,得到生日
Console.WriteLine("请输入你的身份证号码:"); string a = Console.ReadLine(); int year = Convert.ToInt32(a.Substring(6, 4)); int month = Convert.ToInt32(a.Substrin ...
分类:其他好文   时间:2016-04-21 15:19:43    阅读次数:132
输入十个学生的成绩,判断及格不及格人数,得到不及格人的学号
int[] xs = new int[10]; int [] cj=new int [3]; for (int i=0;i<10 ;i++ ) { Console.Write("请输入{0}号学生的成绩:",i+1); xs[i] = Convert.ToInt32(Console.ReadLine ...
分类:其他好文   时间:2016-04-20 09:24:45    阅读次数:157
Visual Studio-C#-20160417-打印星星,迭代穷举
static void Main22(string[] args) { //菱形 Console.WriteLine("请输入腰长:"); int n = Convert.ToInt32(Console.ReadLine()); for (int i = 0; i <n; i++) { for (i ...
分类:Windows程序   时间:2016-04-17 16:03:34    阅读次数:271
随机成绩查询
int fenshu; string zuoye; Console.WriteLine("输入成绩:"); fenshu = Convert .ToInt32 ( Console.ReadLine()); if (fenshu <60) { Console.WriteLine("是否认真做作业,(是 ...
分类:其他好文   时间:2016-04-17 11:46:13    阅读次数:143
刚刚学了循环,1到n的求和与阶乘
//求和 int a = Convert.ToInt32(Console.ReadLine()); int c = 0; for (int b = 0; b <= a; b++) { c = c + b; } Console.Write(c); //阶乘 int a = Convert.ToInt3 ...
分类:其他好文   时间:2016-04-16 17:04:16    阅读次数:166
关于到达楼梯得分问题
Console.Write("请输入到达了第几节楼梯"); int a = Convert.ToInt32(Console.ReadLine()); int end = 0; if (a >= 0 && a <= 49) { for (int b = 0; b <= a; b++) { end = ...
分类:其他好文   时间:2016-04-16 16:34:29    阅读次数:147
个人所得税终极版
Console.WriteLine("这是一个计算纳税金额的程序\n请输入金额:"); Console.Write("金额"); double ygz = Convert.ToInt32(Console.ReadLine()); if (ygz > 3500) { double je = ygz - ...
分类:其他好文   时间:2016-04-16 13:55:25    阅读次数:111
python_关于with及contextlib的用法
平常Coding过程中,经常使用到的with场景是(打开文件进行文件处理,然后隐式地执行了文件句柄的关闭,同样适合socket之类的,这些类都提供了对with的支持): with file('test.py','r') as f : print f.readline() with的作用,类似try. ...
分类:编程语言   时间:2016-04-15 13:35:44    阅读次数:220
完整的老张开车去东北
Console.WriteLine("老张开车去东北。"); string a=Console.ReadLine(); if(a=="撞了") { Console.WriteLine("肇事司机耍流氓。"); string b=Console .ReadLine(); if(b=="跑了") { C ...
分类:其他好文   时间:2016-04-14 12:06:06    阅读次数:218
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!