├── EN.html ├── LICENSE ├── README.md ├── TAs.html ├── articles ├── about.html ├── assets │ └── custom-test.png ├── composition.html ├── debugging.html ├── scheme-builtins.html ├── scheme-spec.html ├── studying.html ├── unix.html └── using-ok.html ├── assets ├── css │ ├── calendar.css │ ├── hw.css │ ├── mono-blue.css │ ├── project.css │ ├── searchbox.css │ └── style.css ├── images │ ├── favicon.ico │ ├── hany-farid.jpg │ ├── john-denero.jpg │ └── logo.png ├── js │ ├── calendar.js │ ├── config.js │ ├── dark-mode.js │ ├── flowchart-data.js │ ├── flowchart.js │ ├── hl.js │ └── sketchy.js ├── pdfs │ ├── 61a-final-study-guide.pdf │ ├── 61a-mt1-study-guide.pdf │ ├── 61a-mt2-study-guide.pdf │ ├── 61a-sp20-final-solution.pdf │ └── 61a-sp20-final.pdf └── slides │ ├── 01-Computer_Science_1pp.pdf │ ├── 01-Computer_Science_8pp.pdf │ ├── 01-Computer_Science_full.pdf │ ├── 02-Functions_1pp.pdf │ ├── 02-Functions_8pp.pdf │ ├── 02-Functions_full.pdf │ ├── 03-Control_1pp.pdf │ ├── 03-Control_8pp.pdf │ ├── 03-Control_full.pdf │ ├── 04-Higher-Order_Functions_1pp.pdf │ ├── 04-Higher-Order_Functions_8pp.pdf │ ├── 04-Higher-Order_Functions_full.pdf │ ├── 05-Environments_1pp.pdf │ ├── 05-Environments_8pp.pdf │ ├── 05-Environments_full.pdf │ ├── 06-Design_1pp.pdf │ ├── 06-Design_8pp.pdf │ ├── 06-Design_full.pdf │ ├── 07-Function_Examples_1pp.pdf │ ├── 07-Function_Examples_8pp.pdf │ ├── 07-Function_Examples_full.pdf │ ├── 08-Recursion_1pp.pdf │ ├── 08-Recursion_8pp.pdf │ ├── 08-Recursion_full.pdf │ ├── 09-Tree_Recursion_1pp.pdf │ ├── 09-Tree_Recursion_8pp.pdf │ ├── 09-Tree_Recursion_full.pdf │ ├── 10-Containers_1pp.pdf │ ├── 10-Containers_8pp.pdf │ ├── 10-Containers_full.pdf │ ├── 11-Data_Abstraction_1pp.pdf │ ├── 11-Data_Abstraction_8pp.pdf │ ├── 11-Data_Abstraction_full.pdf │ ├── 12-Trees_1pp.pdf │ ├── 12-Trees_8pp.pdf │ ├── 12-Trees_full.pdf │ ├── 13-Binary_Numbers_full.pdf │ ├── 14-Circuits_full.pdf │ ├── 15-Mutable_Values_1pp.pdf │ ├── 15-Mutable_Values_8pp.pdf │ ├── 15-Mutable_Values_full.pdf │ ├── 16-Mutable_Functions_1pp.pdf │ ├── 16-Mutable_Functions_8pp.pdf │ ├── 16-Mutable_Functions_full.pdf │ ├── 17-Iterators_1pp.pdf │ ├── 17-Iterators_8pp.pdf │ ├── 17-Iterators_full.pdf │ ├── 18-Objects_1pp.pdf │ ├── 18-Objects_8pp.pdf │ ├── 18-Objects_full.pdf │ ├── 19-Inheritance_1pp.pdf │ ├── 19-Inheritance_8pp.pdf │ ├── 19-Inheritance_full.pdf │ ├── 20-Representation_1pp.pdf │ ├── 20-Representation_8pp.pdf │ ├── 20-Representation_full.pdf │ ├── 21-Composition_1pp.pdf │ ├── 21-Composition_8pp.pdf │ ├── 21-Composition_full.pdf │ ├── 22-Efficiency_1pp.pdf │ ├── 22-Efficiency_8pp.pdf │ ├── 22-Efficiency_full.pdf │ ├── 22.ipynb │ ├── 23-Decomposition_1pp.pdf │ ├── 23-Decomposition_8pp.pdf │ ├── 23-Decomposition_full.pdf │ ├── 23.zip │ ├── 24-Data_Examples_1pp.pdf │ ├── 24-Data_Examples_8pp.pdf │ ├── 24-Data_Examples_full.pdf │ ├── 27-Scheme_1pp.pdf │ ├── 27-Scheme_8pp.pdf │ ├── 27-Scheme_full.pdf │ ├── 28-Exceptions_1pp.pdf │ ├── 28-Exceptions_8pp.pdf │ ├── 28-Exceptions_full.pdf │ ├── 29-Calculator_1pp.pdf │ ├── 29-Calculator_8pp.pdf │ ├── 29-Calculator_full.pdf │ ├── 29.zip │ ├── 30-Interpreters_1pp.pdf │ ├── 30-Interpreters_8pp.pdf │ ├── 30-Interpreters_full.pdf │ ├── 31-Declarative_Programming_1pp.pdf │ ├── 31-Declarative_Programming_8pp.pdf │ ├── 31-Declarative_Programming_full.pdf │ ├── 32-Tables_1pp.pdf │ ├── 32-Tables_8pp.pdf │ ├── 32-Tables_full.pdf │ ├── 33-Aggregation_1pp.pdf │ ├── 33-Aggregation_8pp.pdf │ ├── 33-Aggregation_full.pdf │ ├── 34-Databases_1pp.pdf │ ├── 34-Databases_8pp.pdf │ ├── 34-Databases_full.pdf │ ├── 35-Tail_Calls_1pp.pdf │ ├── 35-Tail_Calls_8pp.pdf │ ├── 35-Tail_Calls_full.pdf │ ├── 36-Macros_1pp.pdf │ ├── 36-Macros_8pp.pdf │ ├── 36-Macros_full.pdf │ ├── 37-Final_Examples_1pp.pdf │ ├── 37-Final_Examples_8pp.pdf │ └── 37-Final_Examples_full.pdf ├── disc ├── disc01.pdf ├── disc02.pdf ├── disc03.pdf ├── disc04.pdf ├── disc05.pdf ├── disc06.pdf ├── disc07.pdf ├── disc08.pdf ├── disc10.pdf ├── disc11.pdf ├── disc12.pdf └── disc14.pdf ├── exam ├── fa16 │ ├── mt1 │ │ ├── 61a-fa16-mt1.pdf │ │ └── 61a-fa16-mt1_tagged.pdf │ └── mt2 │ │ ├── 61a-fa16-mt2.pdf │ │ └── 61a-fa16-mt2_tagged.pdf ├── fa18 │ ├── final │ │ └── 61a-fa18-final_tagged.pdf │ ├── mt1 │ │ ├── 61a-fa18-mt1.pdf │ │ └── 61a-fa18-mt1_tagged.pdf │ └── mt2 │ │ ├── 61a-fa18-mt2.pdf │ │ └── 61a-fa18-mt2_tagged.pdf ├── fa19 │ ├── final │ │ ├── 61a-fa19-final.pdf │ │ └── 61a-fa19-final_tagged.pdf │ ├── mt1 │ │ ├── 61a-fa19-mt1.pdf │ │ └── 61a-fa19-mt1_tagged.pdf │ └── mt2 │ │ ├── 61a-fa19-mt2.pdf │ │ └── 61a-fa19-mt2_tagged.pdf ├── fa20 │ ├── final │ │ └── 61a-fa20-final.pdf │ ├── mt1 │ │ └── 61a-fa20-mt1.pdf │ └── mt2 │ │ └── 61a-fa20-mt2.pdf ├── sp18 │ ├── final │ │ └── 61a-sp18-final_tagged.pdf │ ├── mt1 │ │ ├── 61a-sp18-mt1.pdf │ │ └── 61a-sp18-mt1_tagged.pdf │ └── mt2 │ │ ├── 61a-sp18-mt2.pdf │ │ └── 61a-sp18-mt2_tagged.pdf ├── sp19 │ └── mt1 │ │ ├── 61a-sp19-mt1.pdf │ │ └── 61a-sp19-mt1_tagged.pdf ├── sp20 │ └── mt1 │ │ ├── 61a-sp20-mt1.pdf │ │ └── 61a-sp20-mt1_tagged.pdf └── su19 │ ├── final │ └── 61a-su19-final.pdf │ └── mt │ └── 61a-su19-mt.pdf ├── hw ├── hw01 │ ├── EN.html │ ├── hw01.zip │ └── index.html ├── hw02 │ ├── EN.html │ ├── hw02.py │ ├── hw02.zip │ └── index.html ├── hw03 │ ├── EN.html │ ├── assets │ │ ├── mobile-planet-labeled.png │ │ ├── mobile-planet.png │ │ └── preorder.png │ ├── hw03.zip │ └── index.html ├── hw04 │ ├── EN.html │ ├── hw04.py │ ├── hw04.zip │ └── index.html ├── hw05 │ ├── EN.html │ ├── assets │ │ └── preorder.png │ ├── hw05.py │ ├── hw05.zip │ └── index.html ├── hw06 │ ├── EN.html │ ├── hw06.zip │ └── index.html ├── hw07 │ ├── EN.html │ ├── hw07.zip │ └── index.html ├── hw08 │ ├── EN.html │ ├── hw08.zip │ └── index.html ├── hw09 │ ├── EN.html │ ├── hw09.zip │ └── index.html └── hw10 │ ├── EN.html │ └── index.html ├── index.html ├── instructor.html ├── lab ├── lab00 │ ├── assets │ │ ├── git-bash-options.png │ │ ├── python-windows-install-path.png │ │ ├── terminal.png │ │ └── terminal_commands.png │ ├── index.html │ └── lab00.zip ├── lab01 │ ├── EN.html │ ├── index.html │ └── lab01.zip ├── lab02 │ ├── EN.html │ ├── index.html │ ├── lab02.zip │ └── ok ├── lab03 │ ├── EN.html │ ├── index.html │ ├── lab03.zip │ └── ok ├── lab04 │ ├── EN.html │ ├── assets │ │ └── grid.jpg │ ├── index.html │ └── lab04.zip ├── lab05 │ ├── EN.html │ ├── assets │ │ └── cs61a-tree.png │ ├── index.html │ ├── lab05.zip │ └── ok ├── lab06 │ ├── EN.html │ ├── index.html │ ├── lab06.zip │ └── ok ├── lab07 │ ├── EN.html │ ├── index.html │ ├── lab07.zip │ └── ok ├── lab08 │ ├── EN.html │ ├── assets │ │ ├── arraylist.png │ │ ├── arraylist_insert.png │ │ ├── linkedlist.png │ │ └── linkedlist_insert.png │ ├── index.html │ └── lab08.zip ├── lab09 │ ├── EN.html │ ├── index.html │ └── lab09.zip ├── lab10 │ ├── EN.html │ ├── assets │ │ ├── list1.png │ │ └── list2.png │ ├── index.html │ └── lab10.zip ├── lab11 │ ├── EN.html │ ├── index.html │ └── lab11.zip ├── lab12 │ ├── EN.html │ ├── assets │ │ ├── big-game.png │ │ └── joins.png │ ├── index.html │ ├── lab12.zip │ └── ok ├── lab13 │ ├── EN.html │ ├── index.html │ └── lab13.zip └── lab14 │ ├── EN.html │ ├── index.html │ └── lab14.zip ├── office-hours.html ├── proj ├── ants │ ├── EN.html │ ├── ants.zip │ ├── assets │ │ ├── colony-drawing.png │ │ ├── insects │ │ │ ├── ant_bodyguard.gif │ │ │ ├── ant_fire.gif │ │ │ ├── ant_harvester.gif │ │ │ ├── ant_hungry.gif │ │ │ ├── ant_laser.gif │ │ │ ├── ant_longthrower.gif │ │ │ ├── ant_ninja.gif │ │ │ ├── ant_queen.gif │ │ │ ├── ant_scary.gif │ │ │ ├── ant_scuba.gif │ │ │ ├── ant_shortthrower.gif │ │ │ ├── ant_slow.gif │ │ │ ├── ant_tank.gif │ │ │ ├── ant_thrower.gif │ │ │ └── ant_wall.gif │ │ ├── splash.png │ │ └── submitted.png │ ├── img │ │ └── gui_explanation.png │ └── index.html ├── cats │ ├── EN.html │ ├── cats.zip │ ├── images │ │ └── cats_typing_still.gif │ └── index.html ├── hog │ ├── EN.html │ ├── assets │ │ └── icon.gif │ ├── hog.zip │ └── index.html ├── hog_contest │ ├── EN.html │ ├── hog_contest.zip │ └── index.html ├── scheme │ ├── EN.html │ ├── images │ │ ├── lambda.png │ │ ├── let.png │ │ └── money_tree.png │ ├── index.html │ └── scheme.zip ├── scheme_contest │ ├── EN.html │ ├── index.html │ └── scheme_contest.zip ├── scheme_gallery │ ├── EN.html │ ├── entries │ │ ├── 38346344 │ │ │ └── artwork.png │ │ ├── 05e89b52 │ │ │ └── artwork.png │ │ ├── 090d45d4 │ │ │ └── artwork.png │ │ ├── 1158f5f8 │ │ │ └── artwork.png │ │ ├── 337e6b92 │ │ │ └── artwork.png │ │ ├── 3949b07b │ │ │ └── artwork.png │ │ ├── 3c8b3180 │ │ │ └── artwork.png │ │ ├── 54196e29 │ │ │ └── artwork.png │ │ ├── 5f49e954 │ │ │ └── artwork.png │ │ ├── 66ad6e82 │ │ │ └── artwork.png │ │ ├── 6864819c │ │ │ └── artwork.png │ │ ├── 6a3de5b1 │ │ │ └── artwork.png │ │ ├── 73595e63 │ │ │ └── artwork.png │ │ ├── 7b73a72e │ │ │ └── artwork.png │ │ ├── 86a8f93b │ │ │ └── artwork.png │ │ ├── 8a5fb2c3 │ │ │ └── artwork.png │ │ ├── 9c458b24 │ │ │ └── artwork.png │ │ ├── 9de3deb1 │ │ │ └── artwork.png │ │ ├── a820bac7 │ │ │ └── artwork.png │ │ ├── aa07ff5a │ │ │ └── artwork.png │ │ ├── bda9643a │ │ │ └── artwork.png │ │ ├── c29c0819 │ │ │ └── artwork.png │ │ ├── c6586b2e │ │ │ └── artwork.png │ │ ├── c74670f1 │ │ │ └── artwork.png │ │ ├── c97e4b00 │ │ │ └── artwork.png │ │ ├── d0e1dc9d │ │ │ └── artwork.png │ │ ├── d2969080 │ │ │ └── artwork.png │ │ ├── d3ed09d6 │ │ │ └── artwork.png │ │ ├── d6b06054 │ │ │ └── artwork.png │ │ ├── e2d34b0f │ │ │ └── artwork.png │ │ ├── e6a6ce80 │ │ │ └── artwork.png │ │ ├── f8e6ff3c │ │ │ └── artwork.png │ │ ├── late1 │ │ │ └── artwork.jpg │ │ └── late2 │ │ │ └── artwork.png │ └── index.html └── scheme_stubbed │ ├── EN.html │ ├── images │ ├── lambda.png │ ├── let.png │ └── money_tree.png │ ├── index.html │ └── scheme_stubbed.zip ├── resources.html ├── robots.txt ├── staff.html ├── tutors.html └── weekly.html /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 ChillyHigh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CS61A 2020 Fall 中文 2 | 3 | 本项目是对加州大学伯克利分校 [CS 61A 2020 Fall](https://cs61a.org/) 官方网站的镜像。整合了 [CS61A-2020-Fall-Metarials-Mirror](https://github.com/n0rea5on/CS61A-2020-Fall-Metarials-Mirror) 仓库和 [CS_learning 4 | /CS61A/](https://github.com/Stromxun/CS_learning/tree/main/CS61A) 提供的内容。本项目为网站的实验、作业、项目添加了中文翻译;替换了课程视频链接,使其可在 Bilibili 上观看;课本内容也相应的替换为[composing-programs-zh](https://github.com/csfive/composing-programs-zh)项目所提供的中文翻译课本。 5 | 6 | **在线访问:** [https://chillyhigh.github.io/CS61A-CN/](https://chillyhigh.github.io/CS61A-CN/) 7 | 8 | ## 关于 CS 61A 9 | 10 | **CS 61A** 是加州大学伯克利分校(University of California, Berkeley)计算机科学专业的入门课程。该课程旨在教授学生如何使用编程来描述和解决复杂问题,并深入探讨计算机科学的核心概念。 11 | 12 | **课程特点:** 13 | 14 | - 采用 **Python** 作为主要教学语言,强调函数式编程、递归、数据抽象、面向对象编程等编程范式。 15 | - 课程教材为经典教材 *Structure and Interpretation of Computer Programs (SICP)* 。 16 | - 通过实验(Labs)、作业(Homeworks)、项目(Projects)等方式,帮助学生掌握编程技巧并解决实际问题。 17 | - 适合有一定编程基础的学习者,同时也是深入学习计算机科学的良好起点。 18 | 19 | **官网链接:** https://cs61a.org/ 20 | 21 | ## 本项目的改动 22 | 23 | ### 1. **内容补全与扩展** 24 | 25 | - 补全了 [CS61A-2020-Fall-Metarials-Mirror](https://github.com/n0rea5on/CS61A-2020-Fall-Metarials-Mirror) 仓库中缺失的内容。 26 | - 添加了 **Spring 2023** 版本的 **Lab 3**,作为期中复习资源。 27 | 28 | ### 2. **中文翻译** 29 | 30 | 对网站的主要内容(课程介绍、指南、部分作业及讲义)进行了中文翻译,帮助学习者更好地理解课程内容。 31 | 32 | > 本人翻译能力有限,如有疏漏,还请见谅。欢迎提交 [Issue](https://github.com/ChillyHigh/CS61A-CN/issues) 和 [Pull Request](https://github.com/ChillyHigh/CS61A-CN/pulls) 来改进翻译。 33 | 34 | ### 3. **视频资源替换** 35 | 36 | 原网站中的课程视频链接指向 **YouTube**,国内用户访问不便。 37 | 38 | - 将课程视频替换为 **Bilibili** 平台上的对应资源。 39 | - 感谢[@小乖乖的喵星球](https://space.bilibili.com/95093036)搬运的[视频](https://www.bilibili.com/video/BV1s3411G7yM) 40 | 41 | ### 4. **课本替换** 42 | 43 | - 课程使用的在线课本已替换为 [composing-programs-zh](https://github.com/csfive/composing-programs-zh) 项目提供的中文翻译版本 44 | 45 | ## 如何使用 46 | 47 | 1. 直接访问 GitHub Pages 在线版本: 48 | **[点击访问](https://chillyhigh.github.io/CS61A-CN/)** 49 | 50 | 2. 如果需要离线访问,可克隆项目到本地: 51 | 52 | ```bash 53 | git clone https://github.com/ChillyHigh/CS61A-CN.git 54 | cd CS61A-CN 55 | python -m http.server 80 56 | ``` 57 | 3. 在浏览器中打开 `127.0.0.1` 或`localhost:80`即可使用。 58 | 59 | 60 | ## 免责声明 61 | 62 | - 本项目仅供学习和研究之用,不用于商业目的,所有课程内容版权归 UC Berkeley 所有。 63 | - Bilibili 视频资源由第三方上传,与本项目无直接关联,视频内容仅供参考。 64 | - 如果您认为本项目存在侵权问题,请联系我们,我们将及时处理。 65 | 66 | ## 贡献 67 | 68 | 欢迎对该项目的改进和完善提出建议! 69 | 如果你发现任何问题,欢迎提交 [Issue](https://github.com/ChillyHigh/CS61A-CN/issues) 或 [Pull Request](https://github.com/ChillyHigh/CS61A-CN/pulls) 来贡献你的力量。 70 | 71 | ## 致谢 72 | 73 | 感谢 UC Berkeley 提供 CS 61A 课程的开放资源, 74 | 75 | 感谢 [CS61A-2020-Fall-Metarials-Mirror](https://github.com/n0rea5on/CS61A-2020-Fall-Metarials-Mirror)、 [CS_learning](https://github.com/Stromxun/CS_learning/)仓库提供的网页内容, 76 | 77 | 感谢 [composing-programs-zh](https://github.com/csfive/composing-programs-zh) 项目提供的中文翻译教材, 78 | 79 | 感谢[@小乖乖的喵星球](https://space.bilibili.com/95093036)对视频资源的整理与分享。 80 | 81 | 如果本项目对您有所帮助,请点点 **star** ! -------------------------------------------------------------------------------- /articles/assets/custom-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/articles/assets/custom-test.png -------------------------------------------------------------------------------- /assets/css/calendar.css: -------------------------------------------------------------------------------- 1 | .fc { 2 | font-family: "Roboto", sans-serif; 3 | } 4 | 5 | .section-info { 6 | font-size: 14px; 7 | background-color: #fff; 8 | border: 1px solid #000; 9 | border-radius: 20px; 10 | padding: 10px; 11 | margin: auto; 12 | line-height: normal; 13 | } 14 | 15 | .fc-event { 16 | font-size: 0.8em; 17 | padding: 1px; 18 | margin: 2px; 19 | border: none; 20 | } 21 | 22 | .fc-title { 23 | font-weight: bold; 24 | } 25 | 26 | .fc-location { 27 | font-size: 0.85em; 28 | } 29 | 30 | .fc-time-grid .fc-slats .fc-minor td { 31 | border: none; 32 | } 33 | 34 | .fc-time-grid .fc-slats td { 35 | height: 2em; 36 | } 37 | 38 | .fc-ltr .fc-time-grid .fc-event-container { 39 | margin: 0; 40 | } 41 | -------------------------------------------------------------------------------- /assets/css/hw.css: -------------------------------------------------------------------------------- 1 | .sol-highlight { 2 | color: #CC3232; 3 | } 4 | -------------------------------------------------------------------------------- /assets/css/mono-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Five-color theme from a single blue hue. 3 | */ 4 | .hljs { 5 | display: block; 6 | overflow-x: auto; 7 | background: inherit; 8 | -webkit-text-size-adjust: none; 9 | } 10 | 11 | .hljs, 12 | .hljs-list .hljs-built_in { 13 | color: #00193a; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-title, 18 | .hljs-important, 19 | .hljs-request, 20 | .hljs-header, 21 | .hljs-javadoctag { 22 | font-weight: bold; 23 | } 24 | 25 | .hljs-comment, 26 | .hljs-chunk { 27 | color: #738191; 28 | } 29 | 30 | .hljs-string, 31 | .hljs-title, 32 | .hljs-parent, 33 | .hljs-built_in, 34 | .hljs-literal, 35 | .hljs-filename, 36 | .hljs-value, 37 | .hljs-addition, 38 | .hljs-tag, 39 | .hljs-argument, 40 | .hljs-link_label, 41 | .hljs-blockquote, 42 | .hljs-header, 43 | .hljs-name { 44 | color: #0048ab; 45 | } 46 | 47 | .hljs-decorator, 48 | .hljs-prompt, 49 | .hljs-yardoctag, 50 | .hljs-subst, 51 | .hljs-symbol, 52 | .hljs-doctype, 53 | .hljs-regexp, 54 | .hljs-preprocessor, 55 | .hljs-pragma, 56 | .hljs-pi, 57 | .hljs-attribute, 58 | .hljs-attr_selector, 59 | .hljs-javadoc, 60 | .hljs-xmlDocTag, 61 | .hljs-deletion, 62 | .hljs-shebang, 63 | .hljs-string .hljs-variable, 64 | .hljs-link_url, 65 | .hljs-bullet, 66 | .hljs-sqbracket, 67 | .hljs-phony { 68 | color: #4c81c9; 69 | } 70 | 71 | /* 72 | FILE ARCHIVED ON 20:55:33 May 17, 2021 AND RETRIEVED FROM THE 73 | INTERNET ARCHIVE ON 11:23:40 Jan 25, 2025. 74 | JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. 75 | 76 | ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. 77 | SECTION 108(a)(3)). 78 | */ 79 | /* 80 | playback timings (ms): 81 | captures_list: 2.435 82 | exclusion.robots: 0.024 83 | exclusion.robots.policy: 0.011 84 | esindex: 0.012 85 | cdx.remote: 21.041 86 | LoadShardBlock: 205.15 (3) 87 | PetaboxLoader3.resolve: 335.858 (3) 88 | PetaboxLoader3.datanode: 121.477 (4) 89 | load_resource: 274.332 90 | */ -------------------------------------------------------------------------------- /assets/css/project.css: -------------------------------------------------------------------------------- 1 | /* Stylesheet for CS 61A projects */ 2 | /* IE5 Mac hack \*/ 3 | pre { 4 | overflow: auto; 5 | overflow-y: hidden; 6 | margin: 0 0 1.5em; 7 | } 8 | 9 | /* End IE5 Mac hack */ 10 | /* Ants */ 11 | table.ant { 12 | margin: 10px auto; 13 | border-collapse: collapse; 14 | } 15 | 16 | table.ant td { 17 | margin: 0; 18 | padding: 0.5em; 19 | border: 1px solid #000000; 20 | text-align: center; 21 | } 22 | 23 | table.ant img { 24 | max-width: 80px; 25 | } 26 | 27 | /* Haiku */ 28 | .haiku { 29 | text-align: center; 30 | } 31 | 32 | .haiku blockquote { 33 | font-style: italic; 34 | background-color: inherit; 35 | border-color: transparent; 36 | } 37 | 38 | .haiku img { 39 | max-width: 80%; 40 | } 41 | -------------------------------------------------------------------------------- /assets/css/searchbox.css: -------------------------------------------------------------------------------- 1 | .searchbox { 2 | text-align: center; 3 | } 4 | -------------------------------------------------------------------------------- /assets/css/style.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | body { 3 | font-family: "Work Sans", sans-serif; 4 | font-size: 1.5em; 5 | } 6 | 7 | code, kbd, pre, samp { 8 | font-family: "Inconsolata", monospace; 9 | font-size: 100%; 10 | } 11 | 12 | h1, h2, h3, h4, .navbar { 13 | font-family: "Roboto", sans-serif; 14 | margin-top: 1em; 15 | font-weight: 500; 16 | } 17 | 18 | /* Necessary to have fixed nav bar and TOC interaction */ 19 | h1:before, h2:before, h3:before, h4:before { 20 | content: " "; 21 | display: block; 22 | height: 60px; 23 | margin-top: -60px; 24 | visibility: hidden; 25 | } 26 | 27 | .navbar { 28 | margin-top: 0; 29 | } 30 | 31 | h1 { 32 | font-weight: lighter; 33 | color: #0072c1; 34 | padding-top: 1.2em; 35 | padding-bottom: 0.2em; 36 | border-bottom: 1px solid #eee; 37 | } 38 | 39 | h2, .navbar { 40 | font-weight: 400; 41 | } 42 | 43 | section, footer { 44 | margin: 2em 0; 45 | } 46 | 47 | header { 48 | padding-bottom: 0.5em; 49 | margin: 3.75em 0 1em; 50 | } 51 | 52 | header h1 { 53 | color: #0072c1; 54 | } 55 | 56 | footer { 57 | margin-bottom: 6em; 58 | } 59 | 60 | li p { 61 | margin: 0 0; 62 | } 63 | 64 | a, button, .btn { 65 | outline: 0; 66 | } 67 | 68 | a:hover { 69 | text-decoration: none; 70 | } 71 | 72 | blockquote { 73 | background-color: #e6f3ff; 74 | border-left: solid #0072c1; 75 | font-size: inherit; 76 | } 77 | 78 | abbr { 79 | font-variant: small-caps; 80 | letter-spacing: 0.1em; 81 | text-transform: lowercase; 82 | } 83 | 84 | ::selection { 85 | background: #fff200; 86 | } 87 | 88 | ::-moz-selection { 89 | background: #fff200; 90 | } 91 | 92 | .noselect { 93 | user-select: none; 94 | } 95 | 96 | .disabled { 97 | display: none; 98 | } 99 | 100 | .forecast a { 101 | background-color: rgba(255, 128, 0, 0.25); 102 | } 103 | 104 | .badge { 105 | background-color: #0072c1; 106 | color: #fff; 107 | } 108 | 109 | .inline-block { 110 | display: inline-block; 111 | } 112 | 113 | .list-inline { 114 | display: inline; 115 | margin-bottom: 0px; 116 | } 117 | 118 | .list-inline li { 119 | padding-left: 3px; 120 | padding-right: 0px; 121 | } 122 | 123 | .assignment-text { 124 | padding-right: 5px; 125 | display: inline; 126 | } 127 | 128 | /* Code */ 129 | pre code { 130 | word-wrap: normal; 131 | white-space: pre; 132 | } 133 | 134 | code { 135 | color: #0072c1; 136 | } 137 | 138 | /* Current assignments */ 139 | .assignments { 140 | text-align: center; 141 | } 142 | 143 | /* Announcements */ 144 | #announcements-pager { 145 | min-height: 10em; 146 | } 147 | 148 | .announcement { 149 | display: none; 150 | /* Hide on load */ 151 | position: relative; 152 | } 153 | 154 | .announcement .header { 155 | font-family: "Roboto", sans-serif; 156 | margin-top: 20px; 157 | font-weight: 500; 158 | font-size: 24px; 159 | margin-bottom: 10px; 160 | line-height: 1.1; 161 | color: inherit; 162 | } 163 | 164 | .announcement .prev, .announcement .next { 165 | color: #ccc; 166 | cursor: pointer; 167 | font-size: 1.5em; 168 | position: absolute; 169 | top: 2.5em; 170 | } 171 | 172 | .announcement .prev { 173 | left: -2em; 174 | padding: 0.75em 0.75em 0.75em 1em; 175 | } 176 | 177 | .announcement .next { 178 | padding: 0.75em 1em 0.75em 0.75em; 179 | right: -2em; 180 | } 181 | 182 | .announcement .prev:hover, .announcement .next:hover { 183 | color: #555; 184 | } 185 | 186 | @media (max-width: 991px) { 187 | .announcement { 188 | padding: 0 2em; 189 | overflow-x: hidden; 190 | } 191 | 192 | .announcement ul, .announcement ol { 193 | padding-left: 1.5em; 194 | } 195 | 196 | .announcement .prev { 197 | left: -1em; 198 | } 199 | 200 | .announcement .next { 201 | right: -1em; 202 | } 203 | } 204 | .highlight-resources { 205 | display: flex; 206 | } 207 | 208 | .highlight-resource { 209 | flex: 1 0 50%; 210 | } 211 | 212 | /* Calendar */ 213 | .topic { 214 | margin: 2em 0; 215 | position: relative; 216 | } 217 | 218 | .resource-topic { 219 | margin: 0; 220 | } 221 | 222 | .topic header, .topic section { 223 | margin: 0; 224 | } 225 | 226 | .topic header .title { 227 | margin-left: 40px; 228 | } 229 | 230 | .topic header .examq-header { 231 | margin-left: 0px; 232 | } 233 | 234 | .topic header .title .header { 235 | margin-left: 0px; 236 | margin-top: 1em; 237 | padding-top: 0; 238 | font-weight: normal; 239 | font-family: "Roboto", sans-serif; 240 | font-size: 30px; 241 | margin-bottom: 10px; 242 | line-height: 1.1; 243 | color: inherit; 244 | } 245 | 246 | .topic header .exam-header { 247 | margin-left: 0px; 248 | margin-top: 1em; 249 | padding-top: 0; 250 | font-weight: normal; 251 | font-family: "Roboto", sans-serif; 252 | font-size: 30px; 253 | margin-bottom: 10px; 254 | line-height: 1.1; 255 | color: inherit; 256 | } 257 | 258 | .topic header .exam-header a { 259 | color: #333; 260 | } 261 | 262 | .topic header a:focus { 263 | text-decoration: none; 264 | } 265 | 266 | .topic header .glyphicon { 267 | transition: transform 0.2s; 268 | font-size: 90%; 269 | font-weight: 400; 270 | line-height: 1; 271 | color: #777; 272 | } 273 | 274 | .topic header .glyphicon.up { 275 | transform: rotate(-180deg); 276 | } 277 | 278 | .topic header .glyphicon.down { 279 | transform: none; 280 | } 281 | 282 | .topic header .list-inline { 283 | margin: 0; 284 | line-height: 1.5; 285 | } 286 | 287 | .topic header .list-inline li { 288 | padding: 0; 289 | } 290 | 291 | .topic header .list-inline li a, 292 | .topic header .list-inline li span { 293 | bottom: 0.15em; 294 | font-weight: normal; 295 | position: relative; 296 | } 297 | 298 | .topic main { 299 | padding: 0 1em; 300 | border: 1px solid #eee; 301 | background-color: #fafafa; 302 | } 303 | 304 | .topic .resource { 305 | padding: 0; 306 | margin-bottom: 0.5em; 307 | border: none; 308 | background-color: inherit; 309 | } 310 | 311 | .topic .timeline { 312 | padding: 1em 0; 313 | } 314 | 315 | .timeline table { 316 | width: 100%; 317 | } 318 | 319 | .timeline .week { 320 | padding: 1em; 321 | width: 100%; 322 | } 323 | 324 | .timeline .week ~ .week { 325 | border-top: 1px solid #ddd; 326 | } 327 | 328 | .timeline .week td { 329 | vertical-align: top; 330 | } 331 | 332 | .topic .list-inline li { 333 | padding-right: 0; 334 | } 335 | 336 | .start-date { 337 | position: absolute; 338 | line-height: 0.5em; 339 | left: 0; 340 | } 341 | 342 | .day { 343 | list-style: none; 344 | padding: 10px; 345 | margin-bottom: 0; 346 | position: relative; 347 | min-height: 32px; 348 | min-width: 290px; 349 | flex: 0 0 33.333%; 350 | } 351 | 352 | .date { 353 | background-color: #ccc; 354 | padding: 0 0.75em; 355 | height: 24px; 356 | line-height: 24px; 357 | border-radius: 12px; 358 | color: white; 359 | display: inline-block; 360 | } 361 | 362 | .date.active { 363 | background-color: #0072c1; 364 | } 365 | 366 | .line { 367 | position: absolute; 368 | border: 5.5px solid #ccc; 369 | border-radius: 5.5px; 370 | left: 21px; 371 | bottom: 20px; 372 | top: 43px; 373 | } 374 | 375 | .event { 376 | color: #aaa; 377 | margin-left: 28px; 378 | padding: 5px 0; 379 | position: relative; 380 | } 381 | 382 | .event::before { 383 | color: #fff; 384 | content: "•"; 385 | font-size: 2em; 386 | left: -18px; 387 | line-height: 1em; 388 | position: absolute; 389 | top: 0; 390 | } 391 | 392 | .due { 393 | /* background-color: #ccc; */ 394 | background-color: #A4CCEB; 395 | vertical-align: top; 396 | } 397 | 398 | .past .date, .past .due { 399 | background-color: #A4CCEB; 400 | } 401 | 402 | .active .date, .active .due { 403 | background-color: #0072c1; 404 | } 405 | 406 | .past .line { 407 | border-color: #A4CCEB; 408 | } 409 | 410 | .active .line { 411 | border-color: #0072c1; 412 | } 413 | 414 | .past .event, 415 | .active .event { 416 | color: #333; 417 | } 418 | 419 | #flowchart-wrapper { 420 | width: 100%; 421 | height: 250px; 422 | position: relative; 423 | margin-top: 0px; 424 | } 425 | 426 | #flowchart { 427 | width: 100%; 428 | height: 100%; 429 | position: absolute; 430 | left: 0; 431 | top: 0; 432 | z-index: 999; 433 | } 434 | 435 | .resources { 436 | display: flex; 437 | flex-flow: wrap; 438 | } 439 | 440 | .resource { 441 | flex: 1 0 33.333%; 442 | min-width: 290px; 443 | } 444 | 445 | .resource h3, .readings h3 { 446 | text-transform: uppercase; 447 | letter-spacing: 3px; 448 | } 449 | 450 | .readings h3, .readings ul { 451 | display: inline-block; 452 | } 453 | 454 | .resource .list-unstyled { 455 | line-height: 1.8; 456 | } 457 | 458 | .resource .list-inline { 459 | display: inline-block; 460 | margin-left: 0; 461 | } 462 | 463 | .resource .list-inline { 464 | /* Remove extra bottom spacing in "Past Exams" table elements */ 465 | margin-bottom: 0; 466 | } 467 | 468 | .resource-start { 469 | height: 16px; 470 | } 471 | 472 | .still-to-come { 473 | margin-left: 10px; 474 | } 475 | 476 | #still-to-come { 477 | padding: 10px 0 0 0; 478 | } 479 | 480 | .exam-question { 481 | padding-left: 5px; 482 | } 483 | 484 | @media (max-width: 991px) { 485 | .topic .day { 486 | min-width: 0; 487 | } 488 | } 489 | @media (max-width: 600px) { 490 | .timeline table, 491 | .timeline table tr.week, 492 | .timeline table td { 493 | display: inline-block; 494 | } 495 | } 496 | @media (max-width: 370px) { 497 | /* Correct display width on very small devices */ 498 | .topic main { 499 | padding: 0; 500 | } 501 | } 502 | /* Button-like label style */ 503 | .label-outline { 504 | background-color: transparent; 505 | border: 1px solid #ccc; 506 | color: #ccc; 507 | padding: 0.2em 0.4em 0.1em; 508 | } 509 | 510 | a.label-outline:hover, a.label-outline:focus { 511 | background-color: #0072c1; 512 | color: #fff; 513 | } 514 | 515 | a.label-outline { 516 | color: #0072c1; 517 | border: 1px solid #0072c1; 518 | } 519 | 520 | /* Staff page */ 521 | .staffer { 522 | margin: 1em 0; 523 | } 524 | 525 | .staffer ul { 526 | color: #555; 527 | list-style: none; 528 | padding-left: 0; 529 | } 530 | 531 | .staffer-img { 532 | padding-top: 24px; 533 | } 534 | 535 | @media (max-width: 767px) { 536 | .staffer .section { 537 | font-size: smaller; 538 | } 539 | } 540 | .bio { 541 | font-size: 13px; 542 | } 543 | 544 | /* Calendar */ 545 | .table-responsive { 546 | overflow-x: visible; 547 | margin-top: -5px; 548 | } 549 | 550 | table#calendar { 551 | border-collapse: collapse; 552 | margin-left: auto; 553 | margin-right: auto; 554 | } 555 | 556 | table#calendar th { 557 | color: #0072c1; 558 | text-align: center; 559 | border-top: none; 560 | vertical-align: middle; 561 | } 562 | 563 | table#calendar td { 564 | border: 1px solid #fff; 565 | padding: 6px; 566 | vertical-align: middle; 567 | } 568 | 569 | table#calendar tr:not(:first-child) { 570 | background-color: #c1d6e3; 571 | } 572 | 573 | table#calendar td.weeknum { 574 | text-align: center; 575 | } 576 | 577 | table#calendar td.reading ul { 578 | list-style-type: none; 579 | margin: 0; 580 | padding: 0; 581 | } 582 | 583 | table#calendar td.even { 584 | background-color: #B0C4DE; 585 | } 586 | 587 | table#calendar tr:hover td:not(.weeknum) { 588 | background-color: #B0C4DE; 589 | } 590 | 591 | /* Navbar colors */ 592 | .navbar-default { 593 | background-color: #0072c1; 594 | border: none; 595 | top: 0; 596 | position: fixed; 597 | right: 0; 598 | left: 0; 599 | } 600 | 601 | .navbar-default .navbar-brand { 602 | color: #ecf0f1; 603 | font-weight: bold; 604 | } 605 | 606 | .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { 607 | color: #ffffff; 608 | } 609 | 610 | .navbar-default .navbar-text { 611 | color: #ecf0f1; 612 | } 613 | 614 | .navbar-default .navbar-nav > li > a { 615 | color: #ecf0f1; 616 | } 617 | 618 | .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { 619 | color: #ffffff; 620 | } 621 | 622 | .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { 623 | color: #ffffff; 624 | background-color: #0085e1; 625 | } 626 | 627 | .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { 628 | color: #ffffff; 629 | background-color: #0085e1; 630 | } 631 | 632 | .navbar-default .navbar-toggle { 633 | border: none; 634 | } 635 | 636 | .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { 637 | background-color: #0085e1; 638 | } 639 | 640 | .navbar-default .navbar-toggle .icon-bar { 641 | background-color: #ecf0f1; 642 | } 643 | 644 | .navbar-default .navbar-collapse, 645 | .navbar-default .navbar-form { 646 | border: none; 647 | } 648 | 649 | .navbar-default .navbar-link { 650 | color: #ecf0f1; 651 | } 652 | 653 | .navbar-default .navbar-link:hover { 654 | color: #ffffff; 655 | } 656 | 657 | .navbar li { 658 | position: relative; 659 | } 660 | 661 | .navbar .special-box { 662 | margin: 9px; 663 | border-radius: 0.5rem; 664 | padding: 5px; 665 | background: #47505c; 666 | border: 1px white solid; 667 | transition: background-color 0.5s; 668 | } 669 | 670 | .navbar .special-box::after { 671 | content: " ⇗"; 672 | } 673 | 674 | .navbar .special-box.special-box:hover { 675 | background-color: #272a34; 676 | } 677 | 678 | @media (max-width: 767px) { 679 | .navbar-default .navbar-nav .open .dropdown-menu > li > a { 680 | color: #ecf0f1; 681 | } 682 | 683 | .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { 684 | color: #ffffff; 685 | } 686 | 687 | .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { 688 | color: #ffffff; 689 | background-color: #0085e1; 690 | } 691 | } 692 | /* Sidebar */ 693 | .sticky { 694 | position: -webkit-sticky; 695 | position: sticky; 696 | top: 5em; 697 | height: 85vh; 698 | overflow-y: auto; 699 | -webkit-overflow-scrolling: touch; 700 | } 701 | 702 | .sidebar { 703 | font-size: 0.9em; 704 | } 705 | 706 | .sidebar > ul > li > a { 707 | padding: 1px 10px; 708 | } 709 | 710 | .sidebar > ul > ul > li > a { 711 | margin-left: 20px; 712 | padding: 1px 10px; 713 | } 714 | 715 | .sidebar > ul > ul > ul > li > a { 716 | margin-left: 40px; 717 | padding: 1px 10px; 718 | } 719 | 720 | .sidebar > ul > ul > ul > ul > li > a { 721 | margin-left: 60px; 722 | padding: 1px 10px; 723 | } 724 | 725 | .sidebar li { 726 | background-color: #fff !important; 727 | } 728 | 729 | .sidebar li > a { 730 | background-color: #fff !important; 731 | } 732 | 733 | .sidebar li > a:hover { 734 | background-color: transparent !important; 735 | } 736 | 737 | .sidebar a:visited { 738 | color: #0072c1 !important; 739 | } 740 | 741 | .sidebar li.active { 742 | background-color: #0072c1 !important; 743 | border-radius: 2px; 744 | } 745 | 746 | .sidebar li.active a { 747 | color: #fff !important; 748 | background-color: #0072c1 !important; 749 | } 750 | 751 | /* Resources */ 752 | .btn-outline { 753 | background-color: #fff; 754 | border: 1px solid #0072c1; 755 | color: #0072c1; 756 | cursor: pointer; 757 | margin: 5px; 758 | } 759 | 760 | .btn-outline:focus { 761 | color: #0072c1; 762 | } 763 | 764 | .btn-outline:hover { 765 | background-color: #0072c1; 766 | border: 1px solid #0072c1; 767 | color: #fff; 768 | } 769 | 770 | .btn-outline:active { 771 | -webkit-box-shadow: none; 772 | box-shadow: none; 773 | } 774 | 775 | .toggle { 776 | margin-bottom: 1em; 777 | } 778 | 779 | .solutiontoggle, .solution { 780 | display: none; 781 | } 782 | 783 | .alwaystoggle { 784 | display: none; 785 | } 786 | 787 | #past-exams--content { 788 | overflow-y: scroll; 789 | height: 268px; 790 | } 791 | 792 | #past-exams- { 793 | z-index: 100; 794 | } 795 | -------------------------------------------------------------------------------- /assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/assets/images/favicon.ico -------------------------------------------------------------------------------- /assets/images/hany-farid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/assets/images/hany-farid.jpg -------------------------------------------------------------------------------- /assets/images/john-denero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/assets/images/john-denero.jpg -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/assets/images/logo.png -------------------------------------------------------------------------------- /assets/js/calendar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Displays the office hours and weekly calendars using 3 | * FullCalendar with Google Calendars integration. 4 | **/ 5 | 6 | var apiKey = 'AIzaSyBZKnVt7lMUmk0E2odYaPUHEO7iDTSBWOM'; 7 | 8 | // Change event url to null. 9 | var transform = function(event) { 10 | event.url = null; 11 | return event; 12 | } 13 | 14 | // Add location to event display. 15 | var render = function(event, element, view) { 16 | element.append($('
').html(event.location)); 17 | return element; 18 | } 19 | 20 | // Show the current week during the semester and the first week of class otherwise. 21 | function calendarStartDate() { 22 | if (moment().isBefore(moment(endDate)) && moment().isAfter(moment(startDate))) { 23 | return moment(); 24 | } 25 | return startDate; 26 | } 27 | 28 | $(document).ready(function() { 29 | $('#office-hours').fullCalendar({ 30 | eventDataTransform: transform, 31 | eventRender: render, 32 | defaultView: $(window).width() >= 768 ? 'agendaWeek' : 'agendaDay', 33 | allDaySlot: false, 34 | slotEventOverlap: false, 35 | hiddenDays: [], 36 | height: "auto", 37 | minTime: "08:00:00", 38 | maxTime: "24:00:00", 39 | defaultDate: calendarStartDate(), 40 | googleCalendarApiKey: apiKey, 41 | eventSources: [ 42 | { 43 | googleCalendarId: officeHoursCalendarId, 44 | cache: true, 45 | color: '#0072c1' 46 | }, 47 | { 48 | googleCalendarId: instructorOfficeHoursCalendarId, 49 | cache: true, 50 | color: '#004090' 51 | }, 52 | { 53 | googleCalendarId: lecturesCalendarId, 54 | cache: true, 55 | color: '#c1d6e3', 56 | textColor: '#000' 57 | } 58 | ] 59 | }); 60 | 61 | $('#weekly').fullCalendar({ 62 | eventDataTransform: transform, 63 | eventRender: render, 64 | defaultView: $(window).width() >= 768 ? 'agendaWeek' : 'agendaDay', 65 | allDaySlot: false, 66 | slotEventOverlap: false, 67 | weekends: true, 68 | height: "auto", 69 | minTime: "08:00:00", 70 | maxTime: "24:59:00", 71 | defaultDate: calendarStartDate(), 72 | googleCalendarApiKey: apiKey, 73 | eventSources: [ 74 | { 75 | googleCalendarId: sectionsCalendarId, 76 | cache: true, 77 | color: '#0072c1' 78 | }, 79 | { 80 | googleCalendarId: lecturesCalendarId, 81 | cache: true, 82 | color: '#c1d6e3', 83 | textColor: '#000' 84 | }, 85 | ] 86 | }); 87 | }); 88 | -------------------------------------------------------------------------------- /assets/js/config.js: -------------------------------------------------------------------------------- 1 | /* Start/end date of semester. Make sure to change utils.py as well */ 2 | var startDate = '2020-08-26', endDate = '2020-12-04'; 3 | 4 | /* Calendar Specification */ 5 | var officeHoursCalendarId = 'c_qbhh4qrvvd5lhgnrikeh8tqhos@group.calendar.google.com'; 6 | var instructorOfficeHoursCalendarId = ''; 7 | var lecturesCalendarId = 'c_49p44snsa9d2roc3fv0j0h31no@group.calendar.google.com'; 8 | var sectionsCalendarId = 'c_e61er5dri18gquei9i7uq9okbs@group.calendar.google.com'; 9 | -------------------------------------------------------------------------------- /assets/js/dark-mode.js: -------------------------------------------------------------------------------- 1 | 2 | // this is an easter egg so the code is intentionally messy 3 | // it activates CS 61A Dark Mode: https://github.com/PerpetualPanda/lambda-dark 4 | 5 | var a = ''; 6 | var b = -770055275; 7 | document.addEventListener('keydown', function (e) { 8 | a += ("" + e.keyCode); 9 | if (a.split('').reduce((a,b)=>{a=((a<<5)-a)+b.charCodeAt(0);return a&a},0) === b) { 10 | var node = document.createElement('style'); 11 | node.innerHTML = 'body{background-color:#0c0c0c;color:#ddd}code,kbd,pre,samp{background-color:#222;border:0;color:#ddd !important}p,li,ul,cite{color:#ddd}input,select{color:#ddd !important;background-color:#222 !important;border:1px solid #333 !important}.dropdown-menu{background-color:#222 !important}.dropdown-menu a{color:#ddd !important}.dropdown-menu a:hover{background-color:#444 !important}.fc-today{background:#222 !important}#office-hours td,#weekly td{border:1px solid #333 !important}#office-hours th,#office-hours tr,#weekly th,#weekly tr{border:0}.resource tr,.resource td,.resource th{background-color:#111 !important;border:1px solid #333 !important}.table-bordered{background-color:#111 !important;border:1px solid #333 !important}h1,h2,h3,h4,.navbar{color:#ddd}h1{color:#fff}header h1{color:#fff}blockquote{background-color:rgba(123,241,252,0.15)}::selection{background:#009fc0}::-moz-selection{background:#009fc0}.forecast a{background-color:rgba(255,255,255,0.5)}.announcement .header{color:#ddd}.announcement .prev:hover,.announcement .next:hover{color:#ddd}.topic header .exam-header a{color:#ddd}.topic header .glyphicon{color:#ddd}.line{border:5.5px solid #222}.due{background-color:#333}.past .event,.active .event{color:#ddd}.staffer ul{color:#ddd}table#calendar td{border:1px solid #333}table#calendar tr:not(:first-child){background-color:#111}table#calendar td.even{background-color:#222}table#calendar tr:hover td:not(.weeknum){background-color:#222}.navbar .special-box.special-box:hover{background-color:#ddd}.sidebar li{background-color:transparent !important}.sidebar li>a{background-color:transparent !important}.btn-outline{background-color:transparent}.hljs{display:block;overflow-x:auto;background:inherit;-webkit-text-size-adjust:none}.hljs,.hljs-list .hljs-built_in{color:#0149a8}.hljs-header,.hljs-important,.hljs-javadoctag,.hljs-keyword,.hljs-request,.hljs-title{font-weight:bold}.hljs-chunk,.hljs-comment{color:#738191}.hljs-addition,.hljs-argument,.hljs-blockquote,.hljs-built_in,.hljs-filename,.hljs-header,.hljs-link_label,.hljs-literal,.hljs-name,.hljs-parent,.hljs-string,.hljs-tag,.hljs-title,.hljs-value{color:#4993fc}.hljs-attr_selector,.hljs-attribute,.hljs-bullet,.hljs-decorator,.hljs-deletion,.hljs-doctype,.hljs-javadoc,.hljs-link_url,.hljs-phony,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-prompt,.hljs-regexp,.hljs-shebang,.hljs-sqbracket,.hljs-string .hljs-variable,.hljs-subst,.hljs-symbol,.hljs-xmlDocTag,.hljs-yardoctag{color:#497fcc}'; 12 | document.body.appendChild(node); 13 | } 14 | }); 15 | 16 | 17 | -------------------------------------------------------------------------------- /assets/js/flowchart-data.js: -------------------------------------------------------------------------------- 1 | /* 2 | Each object in the array represents a single high level category for the flowchart. 3 | The "resources" attribute contains the resources that will be displayed when the category is selected. 4 | */ 5 | resourceData = [ 6 | { 7 | "name": "fundamentals", 8 | "type": "category", 9 | "description": "I feel shaky about a topic and want to brush up on the fundamentals.", 10 | "resources": [ 11 | { 12 | "name": "CS61A Textbook", 13 | "type": "resource", 14 | "href": "http://composingprograms.com/" 15 | }, 16 | { 17 | "name": "Sequoia's Book", 18 | "type": "resource", 19 | "href": "https://sequoia-tree.github.io/" 20 | }, 21 | { 22 | "name": "Guides and Practice Problems by Topic", 23 | "type": "resource", 24 | "href": "/resources.html#resource-start" 25 | } 26 | ] 27 | }, 28 | { 29 | "name": "challenge", 30 | "type": "category", 31 | "description": "I feel comfortable with Discussion and Lab questions for a topic, and want more challenging practice.", 32 | "resources": [ 33 | { 34 | "name": "Exam Questions on ____ in each Topic section", 35 | "type": "resource", 36 | "href": "/resources.html#resource-start" 37 | } 38 | ] 39 | }, 40 | { 41 | "name": "exams", 42 | "type": "category", 43 | "description": "I am interested in studying for exams in general.", 44 | "resources": [ 45 | { 46 | "name": "Studying Guide", 47 | "type": "resource", 48 | "href": "/articles/studying.html" 49 | }, 50 | { 51 | "name": "Past Exams", 52 | "type": "resource", 53 | "href": "/resources.html#past-exams" 54 | }, 55 | { 56 | "name": "Midterm 1 Guides and Practice Problems", 57 | "type": "resource", 58 | "href": "/resources.html#midterm-1" 59 | }, 60 | { 61 | "name": "Midterm 2 Guides and Practice Problems", 62 | "type": "resource", 63 | "href": "/resources.html#midterm-2" 64 | }, 65 | { 66 | "name": "Final Guides and Practice Problems", 67 | "type": "resource", 68 | "href": "/resources.html#final-exam" 69 | }, 70 | { 71 | "name": "Sequoia's Book", 72 | "type": "resource", 73 | "href": "https://sequoia-tree.github.io/" 74 | }, 75 | ] 76 | }, 77 | { 78 | "name": "stuck", 79 | "type": "category", 80 | "description": "I am studying, but feel like I am not improving.", 81 | "resources": [ 82 | { 83 | "name": "See \"Advice\" section", 84 | "type": "resource", 85 | "href": "/resources.html#advice" 86 | } 87 | ] 88 | } 89 | ] 90 | -------------------------------------------------------------------------------- /assets/js/flowchart.js: -------------------------------------------------------------------------------- 1 | /* 2 | This file creates a flowchart from the data in ./flowchart-data.js imported as resourceData. 3 | Each category in resourceData contains a "description" correlating to a challenge a student may potentially face 4 | and an array of resources that could be helpful 5 | Each resource has a "name" and "href" that links to the location of the resource. 6 | 7 | The flowchart object is the core view that remains on the page at all times 8 | Nodes can be added with flowchart.add() 9 | Nodes can be removed with flowchart.remove() 10 | Styling of the flowchart and nodes must be done in this file rather than a .css file 11 | Most styles are added in the flowchart constructor - any valid css can be used 12 | Node dimensions and positions are controlled by the global vars at the top of the file 13 | 14 | cytoscape API documentation: http://js.cytoscape.org/#core 15 | */ 16 | 17 | var rows = 2; 18 | var boxWidth = 250; 19 | var boxHeight = 75; 20 | var xOffset = 25; 21 | var yOffset = 50; 22 | 23 | var flowchart = window.flowchart = cytoscape({ 24 | container: document.getElementById('flowchart'), 25 | 26 | boxSelectionEnabled: false, 27 | autoungrabify: true, 28 | autounselectify: true, 29 | zoomingEnabled: false, 30 | panningEnabled: true, 31 | 32 | style: [ 33 | { 34 | selector: 'node', 35 | style: { 36 | 'shape': 'square', 37 | 'content': 'data(description)', 38 | 'text-valign': 'center', 39 | 'text-halign': 'center', 40 | 'font-size': '15px', 41 | 'font-family': 'Work Sans, sans-serif', 42 | 'color': '#ecf0f1', 43 | 'background-color': '#0072c1', 44 | 'width': 'data(width)', 45 | 'height': 'data(height)', 46 | 'text-wrap': 'wrap', 47 | 'text-max-width': '230px', 48 | 'padding': '0px', 49 | 'overlay-padding': 0, 50 | 'overlay-opacity': 0, 51 | } 52 | }, 53 | { 54 | selector: 'core', 55 | style: { 56 | 'active-bg-opacity': 0, 57 | } 58 | } 59 | ] 60 | }); 61 | 62 | displayResourceCategories(); 63 | 64 | //Create and add nodes for each category in resourceData 65 | function displayResourceCategories() { 66 | flowchart.remove("node[id > '']") //remove all current nodes. 67 | cols = Math.ceil(resourceData.length / rows); 68 | nodes = [] 69 | for (var i = 0; i < resourceData.length; i++) { 70 | var category = resourceData[i] 71 | var n = { 72 | group: "nodes", 73 | data: { 74 | id: category.name, 75 | type: category.type, 76 | index: i, 77 | description: category.description, 78 | width: boxWidth, 79 | height: boxHeight 80 | }, 81 | position: { x: ((boxWidth/2) + xOffset) + (280*(i % cols)), 82 | y: yOffset + (100* Math.floor(i/cols)) 83 | } 84 | } 85 | nodes.push(n) 86 | } 87 | flowchart.add(nodes) 88 | flowchart.reset(); 89 | } 90 | 91 | //Create and add nodes for the selected category 92 | function displayResource(category) { 93 | flowchart.remove("node[id > '']") //remove all current nodes. 94 | resources = resourceData[category].resources 95 | cols = Math.ceil(resources.length / rows); 96 | nodes = [] 97 | for (var i = 0; i < resources.length; i++) { 98 | var resource = resources[i] 99 | var n = { 100 | group: "nodes", 101 | data: { 102 | description: resource.name, 103 | type: resource.type, 104 | href: resource.href, 105 | width: boxWidth, 106 | height: boxHeight 107 | }, 108 | position: { x: ((boxWidth/2) + xOffset) + (280*(i % cols)), 109 | y: yOffset + (100* Math.floor(i/cols)) 110 | } 111 | } 112 | nodes.push(n) 113 | } 114 | backNode = { 115 | group: "nodes", 116 | data: { 117 | id: 'back', //make index? 118 | description: '< Back', 119 | type: 'back', 120 | width: '70px', 121 | height: '30px' 122 | }, 123 | position: { x: (70/2) + xOffset, // 1/2 of width + offset since boxes position is based on center of rectangle. 124 | y: yOffset + (90 * rows) 125 | } 126 | 127 | } 128 | nodes.push(backNode) 129 | flowchart.add(nodes) 130 | } 131 | 132 | //Event handler for clicking nodes 133 | //Resource: redirect to resource location 134 | //Category: display resources for the category 135 | //Back: return to primary view containing all categories 136 | flowchart.on('tap', 'node', function(){ 137 | if (this.data('type') === "resource") { 138 | href = this.data('href') 139 | try { // your browser may block popups 140 | window.open( href, href.charAt(0) === '/' ? '_self' : ''); 141 | } catch(e){ // fall back on url change 142 | href.charAt(0) === '/' ? window.location.replace(href) : window.location.href = this.data('href'); 143 | } 144 | } else if (this.data('type') === "category"){ 145 | displayResource(this.data('index')); 146 | } else if (this.data('type') === 'back') { 147 | displayResourceCategories(); 148 | } 149 | }); 150 | 151 | flowchart.on('mouseover', 'node', function (evt) { 152 | $('html,body').css('cursor', 'pointer'); 153 | evt.target.style('color', '#ffffff'); 154 | evt.target.style('background-color', '#B0C4DE'); 155 | } ); 156 | 157 | flowchart.on('mouseout', 'node', function (evt) { 158 | $('html,body').css('cursor', 'default'); 159 | evt.target.style('color', '#ecf0f1'); 160 | evt.target.style('background-color', '#0072c1'); 161 | }); -------------------------------------------------------------------------------- /assets/js/sketchy.js: -------------------------------------------------------------------------------- 1 | // A little library that adds a sketching button to the nav bar. 2 | // Once clicked, you can draw on a canvas on top of the page, 3 | // and then click again to hide the canvas. 4 | 5 | var makeSketchCanvas = function () { 6 | // Max canvas area (in pixels) before drawing is disabled 7 | // https://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element 8 | const canvasMaxArea = 16e6; 9 | 10 | const activePointers = new Map(); 11 | 12 | // Create the canvas and bind events 13 | const $canvas = $("").css({ 14 | cursor: "crosshair", 15 | top: 0, 16 | left: 0, 17 | position: "absolute", 18 | zIndex: 99, 19 | backgroundColor: "transparent", 20 | backgroundColor: "rgba(0, 0, 0, 0.25)", 21 | userSelect: "none", 22 | pointerEvents: "none", 23 | display: "none", 24 | }); 25 | 26 | const ctx = $canvas[0].getContext("2d"); 27 | 28 | $("body").append($canvas); 29 | 30 | setCanvasHeight(); 31 | 32 | $canvas.on("pointermove", handlePointerEvent); 33 | $canvas.on("pointerdown", handlePointerEvent); 34 | $canvas.on("pointerup", handlePointerEvent); 35 | $canvas.on("pointerout", handlePointerEvent); 36 | $canvas.on("pointercancel", handlePointerEvent); 37 | 38 | // suppress touch scrolling 39 | $canvas.on("touchmove", handlePointerEvent); 40 | 41 | $(window).resize(setCanvasHeight); 42 | 43 | function setCanvasHeight() { 44 | // Make the canvas even taller than the page, 45 | // to provide additional scrap paper for sketching 46 | var canvasWidth = window.innerWidth; 47 | // needed to prevent oversize canvases 48 | var canvasHeight = Math.min( 49 | document.body.clientHeight + 1000, 50 | Math.floor(canvasMaxArea / canvasWidth) 51 | ); 52 | var canvasData = ctx.getImageData(0, 0, canvasWidth, canvasHeight); 53 | $canvas.attr("width", canvasWidth).attr("height", canvasHeight); 54 | ctx.putImageData(canvasData, 0, 0); 55 | } 56 | 57 | function drawPoint(currX, currY) { 58 | ctx.beginPath(); 59 | ctx.fillStyle = "black"; 60 | ctx.fillRect(currX, currY, 2, 2); 61 | ctx.closePath(); 62 | } 63 | 64 | function drawLine(prevX, prevY, currX, currY) { 65 | ctx.beginPath(); 66 | ctx.moveTo(prevX, prevY); 67 | ctx.lineTo(currX, currY); 68 | ctx.strokeStyle = "black"; 69 | ctx.lineWidth = 2; 70 | ctx.stroke(); 71 | ctx.closePath(); 72 | } 73 | 74 | function handlePointerEvent(event) { 75 | const pointerID = event.originalEvent.pointerId; 76 | switch (event.type) { 77 | case "pointerdown": 78 | const currX = event.pageX - $canvas.offset().left; 79 | const currY = event.pageY - $canvas.offset().top; 80 | drawPoint(currX, currY); 81 | activePointers.set(pointerID, [currX, currY]); 82 | break; 83 | case "pointermove": 84 | if (activePointers.has(pointerID)) { 85 | const [prevX, prevY] = activePointers.get(pointerID); 86 | const currX = event.pageX - $canvas.offset().left; 87 | const currY = event.pageY - $canvas.offset().top; 88 | drawLine(prevX, prevY, currX, currY); 89 | activePointers.set(pointerID, [currX, currY]); 90 | } 91 | break; 92 | case "pointerup": 93 | case "pointerout": 94 | case "pointercancel": 95 | activePointers.delete(pointerID); 96 | break; 97 | } 98 | event.preventDefault(); 99 | } 100 | 101 | return $canvas; 102 | }; 103 | 104 | var makeSketchButton = function ($canvas) { 105 | var activateButton = function () { 106 | $drawButton.find("span").css({ 107 | "-webkit-filter": "grayscale(0%)", 108 | filter: "grayscale(0%)", 109 | }); 110 | }; 111 | var deactivateButton = function () { 112 | $drawButton.find("span").css({ 113 | "-webkit-filter": "grayscale(100%)", 114 | filter: "grayscale(100%)", 115 | }); 116 | }; 117 | 118 | var toggleCanvas = function () { 119 | if ($canvas.is(":visible")) { 120 | $canvas.hide(); 121 | $canvas.css("pointerEvents", "none"); 122 | deactivateButton(); 123 | } else { 124 | $canvas.show(); 125 | $canvas.css("pointerEvents", "auto"); 126 | activateButton(); 127 | } 128 | }; 129 | 130 | // Create the button and bind events 131 | var $drawButton = $(" 52 | 53 | 54 | 55 |
56 | 57 | 84 | 85 | 86 | 87 |
88 | 89 |
90 |
91 |
92 |

93 | 94 | 作业6: Scheme 95 | 96 |
97 | 98 | Homework 6: Scheme 99 | 100 | 101 |
102 | 103 | 106 | 107 | 108 |

109 |
110 | 111 | 112 |

Due by 11:59pm on Thursday, November 5

113 | 114 | 115 | 116 | 117 | 118 |

查看英文原文

119 | 120 |

说明

121 | 122 |

下载 hw06.zip。在压缩包中,你会找到一个名为 hw06.scm 的文件,以及一份 ok 123 | 自动评分器。

124 |

125 | 126 |

提交:完成后使用python3 ok 127 | --submit来提交代码。你可以在截止日期前多次提交;只有最后一次提交会被评分。请检查你是否成功提交了代码到okpy.org。更多提交作业的说明请参见Lab0

130 |

使用Ok:如果你对使用Ok有任何疑问,请参考本指南

131 | 132 |

阅读材料:以下阅读材料可能对你有帮助

133 | 138 | 139 | 140 |

评分:作业评分基于正确性。每个错误的问题将使总分减少一分。课程大纲中有作业恢复政策。 141 | 本次作业满分为2分。 142 |

143 | 144 | 145 | 146 | 147 |

在解决问题时,code.cs61a.org/scheme 148 | 可能对你有用,它可以绘制环境图和框图,并允许你逐步执行代码(类似于 Python Tutor)。不过,不要忘记通过 Ok 提交你的代码!

149 | 150 |

Scheme 编辑器

151 | 152 |

在编写代码时,你可以使用 Scheme 编辑器进行调试。在你的 scheme 文件夹中,你会找到一个新的编辑器。要运行此编辑器,请执行 153 | python3 editor。这应该会在你的浏览器中弹出一个窗口;如果没有,请手动访问 localhost:31415。 154 |

155 | 156 |

请确保在一个单独的标签页或窗口中运行 python3 ok,这样编辑器才能保持运行。

157 | 158 |

如果你发现代码在在线编辑器中可以运行,但在本地解释器中无法运行,可能是前面部分的代码存在错误,你需要进行调试。偶尔会有一些测试无法捕捉到的错误,如果你发现了,请告诉我们!

159 | 160 | 161 | 162 |

必答题

163 | 164 | 165 |

Scheme

166 | 167 |

Q1: Thane of Cadr

168 | 169 |

定义过程 cadrcaddr,它们分别返回列表的第二个和第三个元素:

170 | 171 | 172 | 173 | 174 |
(define (cddr s)
175 |   (cdr (cdr s)))
176 | 
177 | (define (cadr s)
178 |   'YOUR-CODE-HERE
179 | )
180 | 
181 | (define (caddr s)
182 |   'YOUR-CODE-HERE
183 | )
184 | 185 | 186 | 187 |
188 | 189 | 190 | 191 |

使用 Ok 来解锁并测试你的代码:

192 |
python3 ok -q cadr-caddr -u --local
193 | python3 ok -q cadr-caddr --local
194 | 195 | 196 | 199 |
200 | 201 | 204 |
205 | 206 |

Q2: 符号函数

207 | 208 |

使用 cond 表达式,定义一个过程 sign,它接受一个参数 num,如果 num 为负数,则返回 -1;如果 209 | num 为零,则返回 0;如果 num 为正数,则返回 1。 210 |

211 | 212 | 213 | 214 |
(define (sign num)
215 |   'YOUR-CODE-HERE
216 | )
217 | 218 |
219 | 220 |

使用 Ok 来解锁并测试你的代码:

221 |
python3 ok -q sign -u --local
222 | python3 ok -q sign --local
223 | 224 | 225 | 228 |
229 | 230 | 233 |
234 | 235 |

Q3: 幂函数

236 | 237 |

实现一个过程 pow,用于计算 xy 次幂,其中 y 238 | 是一个非负整数,使得运算次数呈对数增长,而不是线性增长(递归调用的次数应远小于输入 y)。例如,(pow 2 32) 应该只需 5 次递归调用,而不是 32 239 | 次。同样,(pow 2 64) 应该只需 6 次递归调用。

240 | 241 |
242 |

提示: 请考虑以下结果:

243 | 244 |
    245 |
  1. b2k = (bk)2
  2. 246 |
  3. b2k+1 = b(bk)2
  4. 247 |
248 | 249 |

你可以使用内置谓词 even?odd?。 250 | Scheme 不支持与 Python 相同方式的迭代,因此请考虑其他解决方案。

251 |
252 | 253 | 254 | 255 | 256 |
(define (square x) (* x x))
257 | 
258 | (define (pow x y)
259 |   'YOUR-CODE-HERE
260 | )
261 | 262 | 263 |
264 | 265 |

使用 Ok 来解锁并测试你的代码:

266 |
python3 ok -q pow -u --local
267 | python3 ok -q pow --local
268 | 269 | 270 | 271 | 272 | 275 |
276 | 277 | 280 |
281 | 282 | 283 |

Submit

284 | 285 | 286 |

Make sure to submit this assignment by running:

287 | 288 |
python3 ok --submit
289 | 290 | 297 | 298 | 299 |
300 | 301 |
302 | 317 |
318 |
319 | 320 |
321 | 322 | 350 | 351 | 352 | 353 | 354 | 387 | 388 | 389 | 390 | -------------------------------------------------------------------------------- /hw/hw07/hw07.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/hw/hw07/hw07.zip -------------------------------------------------------------------------------- /hw/hw08/hw08.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/hw/hw08/hw08.zip -------------------------------------------------------------------------------- /hw/hw09/hw09.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/hw/hw09/hw09.zip -------------------------------------------------------------------------------- /hw/hw10/EN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | Homework 10 | CS 61A Fall 2020 39 | 40 | 41 | 42 | 43 | 86 | 87 |
88 | 89 |
90 |
91 |
92 |

93 | 94 | Homework 10: Finale 95 | 96 | 97 |

98 |
99 | 100 | 101 |

Due by 11:59pm on Sunday, December 13

102 | 103 | 104 | 105 | 106 |

This homework has nothing you need to submit to ok. Rather, there are three surveys you need to fill out.

107 | 108 |

Q1: CS 61A Online Survey

109 | 110 |

Fill out the online survey for CS 61A. This is separate 111 | from the campus course evaluations.

112 | 113 |

Q2: CS 61A Course Evaluations

114 | 115 |

Fill out the course evaluations for CS 61A. Watch this 116 | brief video by 117 | HKN for instructions. 118 |

119 | 120 |

Q3: Vote in the Scheme Art Contest

121 | 122 |

Fill out this form to vote for your favorite entries in the 123 | Scheme Art Contest. Check out the gallery of entries here. 124 |

125 | 126 | 133 | 134 | 135 |
136 | 137 | 146 |
147 | 148 |
149 | 150 | 178 | 179 | 180 | 181 | 182 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /hw/hw10/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | Homework 10 | CS 61A Fall 2020 39 | 40 | 41 | 42 | 43 | 86 | 87 |
88 | 89 |
90 |
91 |
92 |

93 | 94 | 作业10: 完结篇 95 |
96 | 97 | Homework 10: Finale 98 | 99 | 100 |
101 | 102 |

103 |
104 | 105 | 106 |

Due by 11:59pm on Sunday, December 13

107 | 108 | 109 | 110 | 111 |

This homework has nothing you need to submit to ok. Rather, there are three surveys you need to fill out.

112 | 113 |

Q1: CS 61A Online Survey

114 | 115 |

Fill out the online survey for CS 61A. This is separate 116 | from the campus course evaluations.

117 | 118 |

Q2: CS 61A Course Evaluations

119 | 120 |

Fill out the course evaluations for CS 61A. Watch this 121 | brief video by 122 | HKN for instructions. 123 |

124 | 125 |

Q3: Vote in the Scheme Art Contest

126 | 127 |

Fill out this form to vote for your favorite entries in the 128 | Scheme Art Contest. Check out the gallery of entries here. 129 |

130 | 131 | 138 | 139 | 140 |
141 | 142 | 151 |
152 | 153 |
154 | 155 | 183 | 184 | 185 | 186 | 187 | 220 | 221 | 222 | 223 | -------------------------------------------------------------------------------- /instructor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Instructors | CS 61A Fall 2020 36 | 37 | 38 | 39 | 40 | 83 | 84 |
85 | 86 |
87 |

Meet the instructors

88 |
89 | 90 |

We are very excited to teach you this fall! Please email 91 | 92 | cs61a@berkeley.edu if you 93 | have any logistical questions or concerns. 94 |

95 | 96 | 97 | 98 | 99 |

100 | Instructors 101 |

102 |

Instructors give course lectures, manage course staff, and oversee course 103 | policies.

104 | 105 |
106 | 107 |
108 | 109 |
110 | Hany Farid 111 |
112 |
113 |

114 | 115 | Hany Farid 116 | 117 |

118 | 130 |
131 | 132 |
133 | 134 |
135 | 136 |
137 | John DeNero 138 |
139 |
140 |

141 | 142 | John DeNero 143 | 144 |

145 | 157 |
158 | 159 |
160 | 161 | 162 |
163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 |
173 | 174 | 202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /lab/lab00/assets/git-bash-options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab00/assets/git-bash-options.png -------------------------------------------------------------------------------- /lab/lab00/assets/python-windows-install-path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab00/assets/python-windows-install-path.png -------------------------------------------------------------------------------- /lab/lab00/assets/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab00/assets/terminal.png -------------------------------------------------------------------------------- /lab/lab00/assets/terminal_commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab00/assets/terminal_commands.png -------------------------------------------------------------------------------- /lab/lab00/lab00.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab00/lab00.zip -------------------------------------------------------------------------------- /lab/lab01/lab01.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab01/lab01.zip -------------------------------------------------------------------------------- /lab/lab02/lab02.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab02/lab02.zip -------------------------------------------------------------------------------- /lab/lab02/ok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab02/ok -------------------------------------------------------------------------------- /lab/lab03/lab03.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab03/lab03.zip -------------------------------------------------------------------------------- /lab/lab03/ok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab03/ok -------------------------------------------------------------------------------- /lab/lab04/assets/grid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab04/assets/grid.jpg -------------------------------------------------------------------------------- /lab/lab04/lab04.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab04/lab04.zip -------------------------------------------------------------------------------- /lab/lab05/assets/cs61a-tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab05/assets/cs61a-tree.png -------------------------------------------------------------------------------- /lab/lab05/lab05.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab05/lab05.zip -------------------------------------------------------------------------------- /lab/lab05/ok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab05/ok -------------------------------------------------------------------------------- /lab/lab06/lab06.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab06/lab06.zip -------------------------------------------------------------------------------- /lab/lab06/ok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab06/ok -------------------------------------------------------------------------------- /lab/lab07/lab07.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab07/lab07.zip -------------------------------------------------------------------------------- /lab/lab07/ok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab07/ok -------------------------------------------------------------------------------- /lab/lab08/assets/arraylist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab08/assets/arraylist.png -------------------------------------------------------------------------------- /lab/lab08/assets/arraylist_insert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab08/assets/arraylist_insert.png -------------------------------------------------------------------------------- /lab/lab08/assets/linkedlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab08/assets/linkedlist.png -------------------------------------------------------------------------------- /lab/lab08/assets/linkedlist_insert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab08/assets/linkedlist_insert.png -------------------------------------------------------------------------------- /lab/lab08/lab08.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab08/lab08.zip -------------------------------------------------------------------------------- /lab/lab09/lab09.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab09/lab09.zip -------------------------------------------------------------------------------- /lab/lab10/assets/list1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab10/assets/list1.png -------------------------------------------------------------------------------- /lab/lab10/assets/list2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab10/assets/list2.png -------------------------------------------------------------------------------- /lab/lab10/lab10.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab10/lab10.zip -------------------------------------------------------------------------------- /lab/lab11/lab11.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab11/lab11.zip -------------------------------------------------------------------------------- /lab/lab12/assets/big-game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab12/assets/big-game.png -------------------------------------------------------------------------------- /lab/lab12/assets/joins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab12/assets/joins.png -------------------------------------------------------------------------------- /lab/lab12/lab12.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab12/lab12.zip -------------------------------------------------------------------------------- /lab/lab12/ok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab12/ok -------------------------------------------------------------------------------- /lab/lab13/lab13.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab13/lab13.zip -------------------------------------------------------------------------------- /lab/lab14/lab14.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/lab/lab14/lab14.zip -------------------------------------------------------------------------------- /office-hours.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | Office Hours | CS 61A Fall 2020 39 | 40 | 41 | 42 | 43 | 86 | 87 |
88 | 89 |
90 |

Office Hours

91 | 92 |

Weekly support schedule.

93 | 94 |

For weekly fixed office hours, join the online queue at oh.cs61a.org and 95 | make a ticket during the 96 | scheduled office hours times below. 97 | 98 | You can also make an OH appointment (varying times, not shown in calendar 99 | below) at oh.cs61a.org/appointments. 100 | Office hours are a great place to get individualized help from staff for any 101 | general or assignment-specific questions.

102 | 103 | 104 | 112 | 113 | 118 | 121 | 123 | 127 | 134 |
135 | 136 |
137 | 138 |
139 | 140 | 168 | 169 | 170 | 171 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /proj/ants/ants.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/ants.zip -------------------------------------------------------------------------------- /proj/ants/assets/colony-drawing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/colony-drawing.png -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_bodyguard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_bodyguard.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_fire.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_fire.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_harvester.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_harvester.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_hungry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_hungry.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_laser.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_laser.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_longthrower.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_longthrower.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_ninja.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_ninja.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_queen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_queen.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_scary.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_scary.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_scuba.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_scuba.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_shortthrower.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_shortthrower.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_slow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_slow.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_tank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_tank.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_thrower.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_thrower.gif -------------------------------------------------------------------------------- /proj/ants/assets/insects/ant_wall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/insects/ant_wall.gif -------------------------------------------------------------------------------- /proj/ants/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/splash.png -------------------------------------------------------------------------------- /proj/ants/assets/submitted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/assets/submitted.png -------------------------------------------------------------------------------- /proj/ants/img/gui_explanation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/ants/img/gui_explanation.png -------------------------------------------------------------------------------- /proj/cats/cats.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/cats/cats.zip -------------------------------------------------------------------------------- /proj/cats/images/cats_typing_still.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/cats/images/cats_typing_still.gif -------------------------------------------------------------------------------- /proj/hog/assets/icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/hog/assets/icon.gif -------------------------------------------------------------------------------- /proj/hog/hog.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/hog/hog.zip -------------------------------------------------------------------------------- /proj/hog_contest/EN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | Optional Contest: Hog Strategy | CS 61A Fall 2020 39 | 40 | 41 | 42 | 43 | 86 | 87 |
88 | 89 |
90 |
91 |
92 |

93 | 94 | Optional Contest: Hog Strategy 95 | 96 | 97 | 98 | 101 | 102 | 103 |

104 |
105 | 106 |
107 |
108 | A strategy is
109 | A single function that makes
110 | Ten thousand choices. 111 |
112 |
113 | 114 | 115 |

Instructions

116 | 117 | 118 |
119 |

This contest is completely optional!

120 |
121 | 122 |

Download a blank final_strategy.py file and simple tests for correct 123 | formatting as a zip archive. Type python3 ok to run the provided 124 | tests.

125 | 126 |

Submit a final_strategy.py file containing a function called final_strategy 127 | and a PLAYER_NAME.

128 | 129 |
python3 ok --submit
130 | 131 |

The contest ends on Monday, September 21st at 11:59 PM. We will use your latest 132 | submission before this date to determine the final results of the contest.

133 | 134 |

You can use the compare_strategies.py file to compute the exact win rate 135 | between any pair of two strategies using our server. Depending on server load, 136 | we may rate-limit or disable this functionality at any point, so consider 137 | re-implementing this file yourself locally!

138 | 139 |

Your strategy can run as long as you want. If ok complains that you're 140 | exceeding the time limit, run it with the flag --timeout 0 to disable the time 141 | limit.

142 | 143 | 144 |

Leaderboard

145 | 146 | 147 |

The leaderboard can be found here. It will 148 | continuously update as the contest progresses. Go to the 149 | server log to see the status of your submission. 150 |

151 | 152 | 153 |

Contest rules

154 | 155 | 156 |

Teams can have one or two people. Each person can only be part of one team.

157 | 158 |

Each submitted strategy will play against all other submissions. The player to 159 | go first will be determined by a flip of a fair coin. We will exactly compute 160 | the expected win rate for each player, so that the outcome of this tournament 161 | will be determined by strategy alone and not the roll of the dice or flip of a 162 | coin. A submission scores a match point each time it has an expected win rate 163 | strictly above 50.0001%. We will rank submissions based on the number of matches 164 | they won. Ties count as losses.

165 | 166 |

The top three submissions will earn the following:

167 | 168 |
    169 |
  1. First place gets 3 points of extra credit.
  2. 170 |
  3. Second place gets 2 points of extra credit.
  4. 171 |
  5. Third place gets 1 point of extra credit.
  6. 172 |
173 | 174 |

Winners will also be publicly recognized in future iterations of 61A.

175 | 176 |

More Contest Rules:

177 | 178 |
    179 |
  • In addition to the game rules described in the Hog Project, 180 | players will roll 8-sided dice on all extra turns.
  • 181 |
  • All strategies must be deterministic, pure functions of the current player 182 | scores. Non-deterministic strategies or strategies based on the history of the 183 | game will not behave as expected when submitted and will likely not do well.
  • 184 |
  • You may use any libraries (such as NumPy, TensorFlow, or anything else you can 185 | think of) in your submission.
  • 186 |
187 | 188 |

If you have any questions about the rules, don't hesitate to post on Piazza.

189 | 190 |

Happy coding!

191 | 192 |
193 | 194 |
195 | 202 |
203 |
204 | 205 |
206 | 207 | 235 | 236 | 237 | 238 | 239 | 272 | 273 | 274 | 275 | -------------------------------------------------------------------------------- /proj/hog_contest/hog_contest.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/hog_contest/hog_contest.zip -------------------------------------------------------------------------------- /proj/hog_contest/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | Optional Contest: Hog Strategy | CS 61A Fall 2020 39 | 40 | 41 | 42 | 43 | 86 | 87 |
88 | 89 |
90 |
91 |
92 |

93 | 94 | Optional Contest: Hog Strategy 95 | 96 | 97 | 98 | 101 | 102 | 103 |

104 |
105 | 106 |

查看英文原文

107 |
108 |
109 | A strategy is
110 | A single function that makes
111 | Ten thousand choices. 112 |
113 |
114 | 115 | 116 |

Instructions

117 | 118 | 119 |
120 |

This contest is completely optional!

121 |
122 | 123 |

Download a blank final_strategy.py file and simple tests for correct 124 | formatting as a zip archive. Type python3 ok to run the provided 125 | tests.

126 | 127 |

Submit a final_strategy.py file containing a function called final_strategy 128 | and a PLAYER_NAME.

129 | 130 |
python3 ok --submit
131 | 132 |

The contest ends on Monday, September 21st at 11:59 PM. We will use your latest 133 | submission before this date to determine the final results of the contest.

134 | 135 |

You can use the compare_strategies.py file to compute the exact win rate 136 | between any pair of two strategies using our server. Depending on server load, 137 | we may rate-limit or disable this functionality at any point, so consider 138 | re-implementing this file yourself locally!

139 | 140 |

Your strategy can run as long as you want. If ok complains that you're 141 | exceeding the time limit, run it with the flag --timeout 0 to disable the time 142 | limit.

143 | 144 | 145 |

Leaderboard

146 | 147 | 148 |

The leaderboard can be found here. It will 149 | continuously update as the contest progresses. Go to the 150 | server log to see the status of your submission. 151 |

152 | 153 | 154 |

Contest rules

155 | 156 | 157 |

Teams can have one or two people. Each person can only be part of one team.

158 | 159 |

Each submitted strategy will play against all other submissions. The player to 160 | go first will be determined by a flip of a fair coin. We will exactly compute 161 | the expected win rate for each player, so that the outcome of this tournament 162 | will be determined by strategy alone and not the roll of the dice or flip of a 163 | coin. A submission scores a match point each time it has an expected win rate 164 | strictly above 50.0001%. We will rank submissions based on the number of matches 165 | they won. Ties count as losses.

166 | 167 |

The top three submissions will earn the following:

168 | 169 |
    170 |
  1. First place gets 3 points of extra credit.
  2. 171 |
  3. Second place gets 2 points of extra credit.
  4. 172 |
  5. Third place gets 1 point of extra credit.
  6. 173 |
174 | 175 |

Winners will also be publicly recognized in future iterations of 61A.

176 | 177 |

More Contest Rules:

178 | 179 |
    180 |
  • In addition to the game rules described in the Hog Project, 181 | players will roll 8-sided dice on all extra turns.
  • 182 |
  • All strategies must be deterministic, pure functions of the current player 183 | scores. Non-deterministic strategies or strategies based on the history of the 184 | game will not behave as expected when submitted and will likely not do well.
  • 185 |
  • You may use any libraries (such as NumPy, TensorFlow, or anything else you can 186 | think of) in your submission.
  • 187 |
188 | 189 |

If you have any questions about the rules, don't hesitate to post on Piazza.

190 | 191 |

Happy coding!

192 | 193 |
194 | 195 |
196 | 203 |
204 |
205 | 206 |
207 | 208 | 236 | 237 | 238 | 239 | 240 | 273 | 274 | 275 | 276 | -------------------------------------------------------------------------------- /proj/scheme/images/lambda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme/images/lambda.png -------------------------------------------------------------------------------- /proj/scheme/images/let.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme/images/let.png -------------------------------------------------------------------------------- /proj/scheme/images/money_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme/images/money_tree.png -------------------------------------------------------------------------------- /proj/scheme/scheme.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme/scheme.zip -------------------------------------------------------------------------------- /proj/scheme_contest/scheme_contest.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_contest/scheme_contest.zip -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/05e89b52/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/05e89b52/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/090d45d4/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/090d45d4/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/1158f5f8/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/1158f5f8/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/337e6b92/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/337e6b92/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/38346344/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/38346344/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/3949b07b/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/3949b07b/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/3c8b3180/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/3c8b3180/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/54196e29/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/54196e29/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/5f49e954/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/5f49e954/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/66ad6e82/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/66ad6e82/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/6864819c/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/6864819c/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/6a3de5b1/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/6a3de5b1/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/73595e63/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/73595e63/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/7b73a72e/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/7b73a72e/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/86a8f93b/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/86a8f93b/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/8a5fb2c3/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/8a5fb2c3/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/9c458b24/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/9c458b24/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/9de3deb1/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/9de3deb1/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/a820bac7/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/a820bac7/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/aa07ff5a/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/aa07ff5a/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/bda9643a/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/bda9643a/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/c29c0819/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/c29c0819/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/c6586b2e/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/c6586b2e/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/c74670f1/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/c74670f1/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/c97e4b00/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/c97e4b00/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/d0e1dc9d/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/d0e1dc9d/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/d2969080/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/d2969080/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/d3ed09d6/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/d3ed09d6/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/d6b06054/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/d6b06054/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/e2d34b0f/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/e2d34b0f/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/e6a6ce80/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/e6a6ce80/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/f8e6ff3c/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/f8e6ff3c/artwork.png -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/late1/artwork.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/late1/artwork.jpg -------------------------------------------------------------------------------- /proj/scheme_gallery/entries/late2/artwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_gallery/entries/late2/artwork.png -------------------------------------------------------------------------------- /proj/scheme_stubbed/images/lambda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_stubbed/images/lambda.png -------------------------------------------------------------------------------- /proj/scheme_stubbed/images/let.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_stubbed/images/let.png -------------------------------------------------------------------------------- /proj/scheme_stubbed/images/money_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_stubbed/images/money_tree.png -------------------------------------------------------------------------------- /proj/scheme_stubbed/scheme_stubbed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChillyHigh/CS61A-CN/7b7b43a42663824ce817ea4c54102a9df268cb3a/proj/scheme_stubbed/scheme_stubbed.zip -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | # CS61A.org 2 | 3 | User-agent: * 4 | Disallow: /hw/solutions/ 5 | -------------------------------------------------------------------------------- /staff.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /weekly.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | Weekly Schedule | CS 61A Fall 2020 39 | 40 | 41 | 42 | 43 | 86 | 87 |
88 | 89 |
90 |

Weekly Schedule

91 | 92 |

93 | Weekly Q&A, lab, discussion, and online exam prep schedule. See Staff for who teaches 94 | what section. 95 |

96 | 97 |

For the instructors' lecture Q&A sessions, join bit.ly/denerozoom.

98 | 99 |
100 | 101 |
102 | 103 |
104 | 105 | 133 | 134 | 135 | 136 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | --------------------------------------------------------------------------------