美文网首页
Python学习笔记0121

Python学习笔记0121

作者: 哈喽小朋友 | 来源:发表于2022-02-22 17:19 被阅读0次

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()
是用来存储用户输入的数值的

相关文章

网友评论

      本文标题:Python学习笔记0121

      本文链接:https://www.haomeiwen.com/subject/seiglrtx.html