Python学习笔记0121

20220121 day2
数学模块 match modules
import
ceil()
floor()
math.``ceil

format string
print(f"Down payment:{down_payment}")

logical operator 逻辑运算符-与或非

and
or
not

字符长度函数Len()

if/ elif/else的区别
先检查if,如果if为假,才运行elif.
在if和elif都为假的情况下,才会运行else。

so the difference is that the code always checks to see if an 'if' statement is true, checks 'elif' statements only if each 'if' and 'elif' statement above it is false,

and 'else' runs only when the conditions for all attached 'if' and 'elif' statements are false.Feb 26, 2021

Project :Weight Converter

input()
是用来存储用户输入的数值的

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容