type
status
date
slug
summary
tags
category
icon
password
Property
Jul 13, 2023 01:59 PM
CS 61 A (Part 2)

review expression



执行操作符的子表达式,执行子表达式的每个操作元,将再将值应用回去



5//2 next smallest number
assignment statement :radius=3958.8
可以自己定义或者从别的库倒入,两种方式
表达式不是值,表达式是为了计算值
expressions are not values,expressions evaluate to some values
2 也是一个表达式,计算出来的值就是2
已经执行完了的值,是不会改变的,哪怕你改变之前的因变量

因此需要重新计算一次




这个室友过程的,右边执行的顺序是从左到右

max=g 声明一个新的,不会改变全局的。fh是max,g和max是min

函数是另一种类型的值



from math import pi



可以修改定义的函数名,但是不能修改内部的变量名称..
… 不知道几个参数









达到return的时候,你会执行return后面的表达式



执行子表达式1-3,作为arguments -2



- 作者:Kitety
- 链接:https://www.kitety.com/article/cs-61a-2
- 声明:本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。
相关文章