Study python_01
Python历史事件
- 1989 年 ——— 荷兰人吉多·范罗苏姆决心开发一个新的脚本解释程序;
- 1991 年 ——— 第一个用C语言实现的Python编译器诞生,Python 的代码对外公布,版本为 0.9.0;
- 1994 年 ——— Python 1.0诞生;
- 2000 年 ——— Python 2.0 发布;
- 2001 年 ——— Python 2.1 基于 Python 软件基金会协议(Python Software Foundation (PSF))发布;
- 2004年 ——— WEB框架 Django 诞生;
- 2008 年 ——— Python 3.0 正式发布,Python 3 被称为 "Python 3000" 或者 "Py3K" 。
- 2014年 ——— 官方宣布版本2将停止更新
- 2020年 ———2.7版本停止使用
Python用处(简写)
web应用开发
自动化运维
网络爬虫
数据分析
科学计算
人工智能
网络攻防*的第一语言
Python内容
python代码书写要求
PEP 8 - Python代码样式指南
https://legacy.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds
注释
单行注释-以#和空格开头
# 这是我的第一个代码
print('hello world')
多行注释-使用三个”“进行包括,代码前后引号需要方向一致
"""
# 这是我的第一个代码
print('hello world')
"""
使用input进行输入
sr1 = input()
使用print进行输出 1.0
sr1 = input()
sr2 = input()
bl1 = float(sr1)
bl2 = float(sr2)
jg = bl1 + bl2
print(jg)

使用print进行输出 2.0
name = input()
print(name,'{}'.format('真帅'))

使用print进行输出 3.0
使用end进行结果横向输出;
使用chr将证书转换成该编码对应的字符串(一个字符);
使用ord将字符串(一个字符)转换成对应的编码(整数);
email = input('输入你的Email:')
for i in email :
res = ord(i)+4
print(chr(res),end="")

进行简单的类型转化
hswd = input()
ssd = float(hswd)
print(ssd*1.8+32)

求圆的面积
sr=input()
bj=float(sr)
print(bj*3.14*bj)
print(2*3.14*bj)
判断闰年
year=int(input())
if (year % 4 ==0 and year % 100 !=0 ) or (year % 400 == 0):
print("true")
else:
print("flase")
简单的输出一个方框
for i in range(10):
print('#',end="")
print()
for k in range(8):
print('#',' '*8,'#',sep="")
for j in range(10):
print('#',end="")
求水仙花数
number=input('输入一个数')
if len(number)>3:
print ('The number is to big!')
else:
bai = int(number[0])
shi = int(number[1])
ge = int(number[2])
if bai ** 3 + shi ** 3+ ge ** 3 ==int(number):
print ('水仙花数')
else:
print ('不是水仙花数')
Study python_01的更多相关文章
- Improve Your Study Habits
1.Plan your time carefully. Make a list of your weekly tasks.Then make a schedule or chart of your t ...
- RSA Study
These days I study the RSA Algorithm. It is a little complex, but not very. Also, my study has not f ...
- Machine Learning Algorithms Study Notes(3)--Learning Theory
Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 22 ...
- Machine Learning Algorithms Study Notes(2)--Supervised Learning
Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 22 ...
- Machine Learning Algorithms Study Notes(1)--Introduction
Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 目 录 1 Introduction 1 1.1 ...
- jar tvf study.war jar命令查看war/jar包的内容
jar tvf study.war 0 Thu Oct 20 14:01:18 CST 2016 META-INF/ 137 Thu Oct 20 14:01:16 CST 2016 META-INF ...
- Mongo DB Study: first face with mongo DB
Mongo DB Study: first face with mongo DB 1. study methods: 1. Translate: I am the mongo DB organiz ...
- A Study of WebRTC Security
转自:http://webrtc-security.github.io/ A Study of WebRTC Security Abstract Web Real-Time Communication ...
- study topics
永远不变的东西,原理 study roadmap: 1.user space: tizen power manager => suspend/resume or runtime? android ...
- 读书笔记2013第10本:《学得少却考得好Learn More Study Less》
<学得少却考得好Learn More Study Less>这本书最早是从褪墨网站上看到的,crowncheng翻译了全文.这本书介绍了不少学习方法,非常适合在校的学生,原文的作者Scot ...
随机推荐
- 15. 测试环境部署-linux
抽奖项目部署文档: 1.抽奖项目使用python3开发,python版本3.x都可以 需要安装的python第三方模块 pip install django==1.9.0 这个一定要加版本号 pip ...
- 如何实现基于GPIO按键的长按,短按,双击
不同的架构实现并不相同,所以我分成了两中:STM32平台和其他平台: STM32平台 首先要分析:该如何判断当前的按键状态:单机和双击是通过在有限时间内是否有新的按动作产生 -- 所以需要一个记录按键 ...
- 面试:关于Zookeeper注册节点的上线和掉线
Zookeeper中有一个重要的部件Monitor(监控中心),它是Dubbo中服务治理体系中的重要一环. 监控中心在启动的时候,会通过Zookeeper的/dubbo/com.foo.BarServ ...
- MassTransit - .NET Core 的分布式应用程序框架
简介 MassTransit 是一个免费的.开源的.NET 分布式应用程序框架.MassTransit 使创建应用程序和服务变得容易,这些应用程序和服务利用基于消息的松散耦合异步通信来实现更高的可用性 ...
- es实现规格动态域生成
1.就是把sepc的可以提取出来作为一个域(sepc是一个规格参数) 封装搜索条件(跟jdbc流程一样) @requestparam( required = false) 的作用? 不传值后台也不 ...
- Day20:update功能的实现
今日完成的任务: 1.将最初设想的消息界面删除,删去message和chat等无参数跳转界面,并在物品详情中增加[联系方式]一栏供大家线下交易使用. 最终完成界面如下 2.实现本个小程序最后一个功能- ...
- MyBatis_02_(搭建Mybatis)
搭建MyBatis 1-开发环境 2-创建Maven工程 2.1- 打包方式 2.2 导入依赖 <!-- 打包方式jar--> <packaging>jar</packa ...
- Redis 实战(一)AOF 持久化配置和数据恢复
真枪实弹:AOF 持久化配置和数据恢复 大家好,我是悟空呀. 如果你曾经背过 RDB 和 AOF 的面试八股文,那么对 AOF 肯定不陌生,但如果只停留在应付面试阶段,对于提高自己的技术是远远不够的, ...
- Arseed 上传图片 快速入门
快速入门 为了方便开发者入门,我们部署了 web3infra.dev 方便开发者永存数据.快速入门将介绍如何使用 arseeding-js 将数据存通过 web3infra.dev 存储到 Arwea ...
- [js函数] shallowEqual
const isBasicType = (t: any) => { return t === "number" || t === "string" || ...
