CS61A
CS61A是UC Berkeley开设的计算机科学的入门课程,定位是给没有任何计算机科学相关知识和经验的同学开设。教师John DeNero教授将MIT的著名课程SICP改编后,重新以更加通俗易懂的方式教授给大家。课程主要运用的编程软件是Python,后期还会学习Scheme, SQL等,以换换口味,增长见识。从暑期开始,我将跟着20Fall的内容,将15个week的内容全部跟着自学完成,祝我自己好运。
Week 1 Lesson 1
what is computer science
To study this discipline, the first thing we need to do is to figure out what exactly we are learning and what problems we need to figure out. So Prof. DeNero gave us an introdution to what we are trying to accomplish in this course.
I think, an important part of this discipline is the interation between users and computation. And through time, computation slowly progressed in the form of computing machines using technology like digital and analog electronic. And hence comes computer science.
In Prof. DeNero’s words: Computer Science is the study of what problems can be solved using computation and how to solve these problems and also what techniques lead to effective resolutions. It means that we are not here to study the electronic circuits of computer’s structure, but we are here to understand how to better manage and control the mathmatical logic of a computer and how to dispatch computer’s inside to work better to a better solution using its computational skills.
Computer Science is more of a general field composed of a lot of sub-fields like Computer System, Artificial Intelligence, Computer Network, Compiling Environment, Object Orientation and so on. And to expand enen more, these sub-fields can be elaborated to sub-sub-fields which is made of even more disciplines.
In this course, we want to master the ability of abstraction, which can be used to solve large problems combining different programming languages.We will be learning the fundamentals of Python and are expected to fully understand it. Apart from that, we will be learning different programming languages and how computers interpret programming languages.
In all, I think it’s a great course for me who do not have a systematic knowledge of computer science and want to learn by myself.
Getting Started
Python is an efficient programming language. I think it’s a good thing that I have experiences in C and C++, which can be helpful when understanding basic grammar of Python.
To begin this course, we have to set up our computers. In the course’s website, we can find in the column below, a chart, which demonstrates what we would do on a weekly schedule. In lab00, we could learn how to configurate our computer.
After configuration, we should have control of a software called Git Bash.

This is what we call a Terminal. I don’t fully understand it, yet. I think of it as an interface that can run in a Python Environment and execute our commands from our keyboards more visually unlike our interpreter like Visual Studio or Visual Studio Codes. It can also execute our commands to control our computers to some extent.
In a Windows environment, we use py (sometimes python or python3) to begin our commands. If successful, we can see a clear prompt, and something like this:

Here, we can interact with Bash using Python.
For example, it can execute some simple mathmatical commands.

It can also manipulate our text of some sorts.

It can also using other built in functions to other purposes.

Here, I use pi from math to put value of pi on this expression.
Now, basically, that’s the content of the first class. It’s just a simple Introduction, but I expect the course to get a lot harder as time goes on.
Lesson 2 Elements Of Programming
- Call Expression:
Call expressions are the most important compound expressions. So first, we need to understand what is call expression and what it is made up of.
Call expressions apply functions to their arguments.

Like this call expression, it is composed of sub-expressions: the sub-expression that precedes the parenthesis is an operator, which is like the name of the function and encloses a comma-delimited list of operand expressions. In this call expression, number 1 and number 2 are the operands. In this example, we say this call expression is evaluated with arguments 1 and 2, and returns the value of 3.
Summary
This part of the course is very much like programming language C, we can use the method of analogy to study the meanings and principals of call expression and Python environment. It’s very simple and easy, but, we need to strap on, because it’s about to get exciting and hard in the next few courses!
本文是关于UC Berkeley的计算机科学入门课程CS61A的学习笔记,主要介绍Week 1的内容。课程旨在教授没有计算机背景的学生Python、Scheme、SQL等编程语言,重点在于理解计算机科学的概念,特别是问题解决和抽象思维能力。第一周的课程涵盖了计算机科学的定义,Python编程的基础,以及如何使用Git Bash进行环境配置。第二课介绍了编程元素中的调用表达式。
3185

被折叠的 条评论
为什么被折叠?



