python学习1

image-20220902130059745

复习知识点

1
2
3
4
5
6
7
8
#!/usr/bin/python
#https://c.runoob.com/compile/9/
# Write Python 3 code in this online editor and run it.

print(round(8.99,0));
运行结果为 9.0


python基础和语法

环境变量

1
2
3
4
python旧版本需要安装pip,
python需要添加环境变量

python与python2.7

image-20220901173206229

image-20220901173651678

image-20220901173921135

linx下默认安装python

yum安装时候不要卸载python–> yum基于python安装,否则死循环;只能源代码方式安装python

1
yum install python2-pip.noarch

image-20220901174350050

未安装或者不在path环境变量路径

image-20220901174745223

image-20220901174041380

linx下默认安装python

yum安装时候不要卸载python–> yum基于python安装,否则死循环;只能源代码方式安装python

image-20220901174350050

未安装或者不在path环境变量路径

image-20220901174745223

基本数据类型

整、长、浮、字符串

列、元、字、集合、布

进制转换

image-20221014112908483

linux python脚本编写

image-20221014181728315

99乘法表格

image-20221014183021210

每行一个*号

image-20221014183318359

sys.path打印环境变量

简洁写法

image-20221014193641724

image-20221014193619721


python学习1
http://example.com/2022/09/01/python学习1/
作者
MuyanGit
发布于
2022年9月1日
许可协议