int [,] a=new int[5,5]; Console.WriteLine("请输入1号的语文成绩:"); a[0, 1] = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("请输入1号的数学成绩:"); a[0, 2] = C ...
分类:
其他好文 时间:
2016-04-23 11:42:55
阅读次数:
229
《python核心编程》学习笔记if__name__==‘__main__‘:一、二、三获得键盘输入1、raw_input(‘‘)2、sys.stdin.readline()strip()取出2边的空格。3<5>4等同于(3<5)and(4<5),这个可是当初C语言入门的时候经常叮嘱的经典错误呀!想不到在这里被实现了,再也不是错误了,..
分类:
编程语言 时间:
2016-04-23 07:48:22
阅读次数:
307
(一)系统环境:OS:centos6.5finalPython:2.6.6(二)步骤:1,写一个Python自动补全脚本首先readline和rlcompleter模块具体如下:,[root@zabbixpython2.6]#vimtab.py#!/usr/bin/python
#pythonTABfile
importsys
importreadline
importrlcompleter
importatexit
importos
#t..
分类:
编程语言 时间:
2016-04-22 16:53:51
阅读次数:
259
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
static void Main22(string[] args) { //菱形 Console.WriteLine("请输入腰长:"); int n = Convert.ToInt32(Console.ReadLine()); for (int i = 0; i <n; i++) { for (i ...
int fenshu; string zuoye; Console.WriteLine("输入成绩:"); fenshu = Convert .ToInt32 ( Console.ReadLine()); if (fenshu <60) { Console.WriteLine("是否认真做作业,(是 ...
分类:
其他好文 时间:
2016-04-17 11:46:13
阅读次数:
143
//求和 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