python3的基础运用

1.输出:print
python3的基础运用
2.注释: #(octothorpe)
python3的基础运用
3.显示在一行:print(,end=“”);
python3的基础运用
end=””传递一个空字符串,这样print函数不会在字符串末尾添加一个换行符。
4.换一行:print(‘\n’);
python3的基础运用
5.求余:%
python3的基础运用
6.布尔型:返回ture或者false
python3的基础运用python3的基础运用
7.浮点数:20.0是一个浮点数
python3的基础运用
8.等于=(equal):取名
python3的基础运用
9._下划线字符(underscore)
python3的基础运用
10.python计算值
1英寸(int)=2.54厘米(cm)
  1磅(ib)=0.45359237千克(kg)


11.字符串格式化方法:F-stringstr.format()

python3的基础运用

python3的基础运用

Str.format()

python3的基础运用

python3的基础运用

python3的基础运用


12.重复打印:

1:字符串*数字

python3的基础运用

2:使用format

python3的基础运用

python3的基础运用