![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Berkeley CS 61A Spring 笔记
_BANA
这个作者很懒,什么都没留下…
展开
-
Berkeley CS 61A Lecture10-15
http://inst.eecs.berkeley.edu/~cs61a/sp18/文章目录CS 61A LECTURE 10 - CODEData AbstractionPairsReducing to Lowest TermsAbstraction BarriersViolating Abstraction BarriersData RepresentationsRational Data ...原创 2020-03-19 17:46:00 · 327 阅读 · 0 评论 -
Berkeley CS 61A Lecture 9
http://inst.eecs.berkeley.edu/~cs61a/sp18/CS 61A LECTURE 9Function AbstractionsChoosing namesWhich values deserve a nameTestingthe greatest common divisor of two integers m and n:#testpyth...原创 2020-03-12 20:42:10 · 153 阅读 · 0 评论 -
Berkeley CS 61A Lecture 8
http://inst.eecs.berkeley.edu/~cs61a/sp18/CS 61A LECTURE 8The Cascade Functiondef cascade(n): if n < 10: print(n) else: print(n) cascade(n // 10) print(n)>>> cascade(5)5&g...原创 2020-03-12 14:11:32 · 220 阅读 · 0 评论 -
Berkeley CS 61A Lecture 7
http://inst.eecs.berkeley.edu/~cs61a/sp18/CS 61A LECTURE 7Recursive Function递归函数Definition: A function is called recursive if the body of that function calls itself, either directly or indirectly...原创 2020-03-11 23:15:00 · 198 阅读 · 0 评论 -
Berkeley CS 61A Lecture 6 (Mario!!!)
http://inst.eecs.berkeley.edu/~cs61a/sp18/CS 61A LECTURE 6Iteration Example: Fibonacci NumbersLecture 4讲过Fibonacci Numbersdef fib(n): """Compute the nth Fibonacci number. >>> fib(0)...原创 2020-03-11 20:57:50 · 267 阅读 · 0 评论 -
Berkeley CS 61A Lecture 5
http://inst.eecs.berkeley.edu/~cs61a/sp18/CS 61A LECTURE 5Environments Enable Higher-Order FunctionsHigher-order function: A function that takes a function as an argument value or returns a functio...原创 2020-03-11 17:38:37 · 183 阅读 · 0 评论 -
Berkeley CS 61A Lecture 4
http://inst.eecs.berkeley.edu/~cs61a/sp18/CS 61A LECTURE 4The Fibonacci Sequence0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, …def fib(n): """Compute the nth Fibonacci number,...原创 2020-01-13 22:42:49 · 458 阅读 · 0 评论 -
Berkeley CS 61A Lecture 3
http://inst.eecs.berkeley.edu/~cs61a/sp18/CS 61A LECTURE 3None Indicates that Nothing is ReturnedThe special value None represents nothing in PythonA function that does not explicitly return a val...原创 2020-01-13 11:52:54 · 320 阅读 · 0 评论 -
Chapter 1 Building Abstractions with Functions
Chapter 1: Building Abstractions with FunctionsA language isn’t something you learn so much as something you join.The line of Python code>>> from urllib.request import urlopenis an im...原创 2020-01-12 17:00:43 · 238 阅读 · 0 评论 -
Berkeley CS 61A Lecture 2
http://inst.eecs.berkeley.edu/~cs61a/sp18/CS 61A LECTURE 2Names, Assignment , and User-Defined Function>>> f = max>>> f<built-in function max>>>> max<built-i...原创 2020-01-05 15:45:59 · 343 阅读 · 0 评论 -
Berkeley CS 61A Lecture 1
http://inst.eecs.berkeley.edu/~cs61a/sp18/CS 61A LECTURE 1What is Computer Science?The study of :What problems can be solved using computation,How to solve those problems, andWhat techniqu...原创 2020-01-05 15:43:40 · 1366 阅读 · 0 评论