自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 问答 (9)
  • 收藏
  • 关注

转载 isinstance函数

转自这里写链接内容今天看了下廖雪峰的网站,发现有个isinstance函数可以对参数类型进行判断:对参数类型做检查,只允许整数和浮点数类型的参数。数据类型检查可以用内置函数isinstance实现:def my_abs(x): if not isinstance(x, (int, float)): raise TypeError('bad operand type')

2017-06-24 14:44:17 4782

原创 C++程序设计 指针与引用

**指针的定义形式:** 指针本身也有对应的指针类型int** iip; // 即(int*)* iip;iip称为二级整型指针变量。 一个*只能修饰一个指针:int* ip, iq; //其中ip为指针变量,iq为整型变量 int* ip,*iq; //定义两个指针变量指针变量的定义,由数据类型后跟型号,再跟指针变量名组成。指针变量在不致引起混淆的情况下也称为指针。 指针可以复制

2017-06-09 16:30:00 302

原创 C++钱能DataTypes

C++中的数据类型,有语言既定的内部数据类型,也有程序员自定义的外部数据类型。 内部数据类型: 整数类型(int) 字符类型(char) 布尔类型(bool) 单精度浮点(float) 双精度浮点(double) 还可以通过数组、指针、引用等来定义基于上面这些数据类型以及其他外部数据类型的编译类型。例如: 整型数组(int[])

2017-06-06 13:28:21 570

原创 Python 基础 读写文件

open 打开文件,当文件不存在时会创建一个空文件 打开后要执行关闭命令,closetext = 'This is my first test.\nThis is next line\nThis is last line.' print(text)my_file = open('my file.txt','w') my_file.write(text) my_file.close()在打开的文件中

2017-06-05 19:51:48 364

原创 Python 基础 def函数

def函数 def function(): print('This is a function.') a=1+2 print(a)function()

2017-06-04 21:16:07 691

原创 Python基础 if条件

if条件x=1 y=2 z=3 if x>y: print('x is greater than y.') if x<y: print('x is less than y.') if x<y<z: print('x is less than y,and y is less than z.')a=2 b=2 if a==b: print('a is equal to y

2017-06-04 21:09:25 265

原创 Python基础 for循环

for 循环example_list =[1,2,3,4,5,6,7,8,9,10,12,1,3] for i in example_list: print(i) print('inner of for') for windows :control+[print('outer of for')inner of for 和outer of for 是存在于for

2017-06-04 20:27:27 450

原创 Python 基础 while循环

while循环condition =1 while condition<10: print(condition) condition = condition+1死循环while True: print("I'm True")

2017-06-04 20:12:36 209

原创 Python基础 print()莫烦视频

print语句print(1) print('we are goning todo something') print("I'm Morvan") print('I\'m m') print('apple'+'car') print('apple'+'4') print('apple'+str(4)) print(1+2) print('1+2') print(int('1')+2) print(f

2017-06-04 19:54:20 207

原创 mount语句

mount 语句sudo mount -t cifs //192.168.0.5/file-name -o username=ute /home/a/wfile-name -o uid=a

2017-06-02 09:31:03 239

转载 欢迎使用CSDN-markdown编辑器

本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦: Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接和图片上传 LaTex数学公式 UML序列图和流程图 离线写博客 导入导出Markdown文件 丰富的快捷键 快捷键 加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl + Q 插入链接

2017-05-31 17:53:41 211

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除