# HelloWorld **Repository Path**: MaverickMing/HelloWorld ## Basic Information - **Project Name**: HelloWorld - **Description**: 最近在学习python,有些练习做起来还是挺有刺激到我的!有点好玩是怎么回事! - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-03-12 - **Last Updated**: 2021-12-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # HelloWorld ## 介绍 这是一个学习Python的记录仓库。 ## 内容 ### lesson01:第一章 Python简介 - hello world!第一个python程序! ### lesson02: 第二章 Python基础 - 1.py数据类型 - 用四种方法输出你的id - 用四种方法输出你的id(大佬方法) - 字符串复制 - 空值 Null None - 8.类型检查 type() - 9.对象(object) py是面向对象的语言,数据存在内存中:对象都存在3个内容:id,type,value - 10.类型转换,不是改变对象本身,而是新建一个对象 - 11.算术运算符 - 12.赋值运算符 = - 13.关系运算符:比较两个值间的关系,总返回boolean值 - 14.逻辑运算符 not and or(java中是|| && or) - 15.条件运算符 if else - 16.运算符的优先级,实在不清楚可以用中括号 ### lesson03:第三章 流程控制语句 - 1.if/if else - 2.input小练习,让用户输入用户名,输入admin则提示欢迎管理员,否则不做反应 - 3.if-else :输入未成年年龄并提示 3.1 输入一个数判断奇数偶数 3.2 输入年份,检查是否为闰年 3.3 if-else-elif 3.4 狗的前两年年龄:一岁相当于人类10.5岁;后面每一年增长4岁.编写一个程序计算狗狗年龄 ### lesson04:第四章 序列 - 列表(list) - 序列(sequence) - EMS (Employee Manager System 员工管理系统)练习题 - 可变对象 - 字典(Dict Type) - 集合(Set Type) ### lesson05:第五章 函数 - 函数(function) - 函数的参数 - 函数式编程 - 装饰器模式 ### lesson06:第六章 对象(Object) - 对象为何物? - 面向对象(OOP) - 类(class) - 使用类创建对象的流程 - 类的定义 - 创建实例对象的流程 - 类的基本结构 - 面向对象的三大特征:封装、继承、多态 ### lesson07:第七章 异常和文件 - 异常 - 处理异常 - 异常的传播(抛出异常) - 文件 #### The Zen of Python PEP 20 -- The Zen of Python Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! #### Pyhton巩固知识的练习题 https://www.runoob.com/python3/python3-examples.html