mit python 公开课_MIT 计算机科学及编程导论 Python 笔记 1

计算机科学及编程导论在 MIT 的课程编号是 6.00.1,是计算机科学及工程学院的经典课程。之前,课程一直使用 Scheme 作为教学语言,不过由于 Python 简单、易学等原因,近年来已经改用 Python 作为教学语言了。更多介绍

最初知道这个课程的时候大概是在 2014 年,对于做事拖沓的我,这门课程已经从低清随堂录制变成了 edX 平台的一门 高清的 MOOC,转眼间已经大三,希望自己能够完成自己曾经定下的计划。以下是在我在学习本课程时的一些笔记,在此与大家共享、共勉。

What does a computer do?

Fundamentally a computer:

Performs some calculations

Remembers results

What calculations?

Built in primitives

Creating our own methods of calculating

Simple calculations are not enough, so good algorithm design also needed to accomplish a task.

Despite its speed and storage, a computer does have limitations

Some problems still too complex

Some problems are fundamentally impossible to computer (e.g. Turing's Halting Problem)

Knowledge

Declarative

Imperative (likes a recipe, "how-to")

Computers

Fixed-program computers (earliest computers)

To solve specific problems

Atanasoff (1941) - linear equations

Turing bombe

Stored-program computers

1104579-20170210210225713-1288002435.png

Program is a recipe. Each programming language provides a set of primitive operations.

Given a fixed set of primitives, a good programmer can program anything.

Anything you can do with a language, you can do with another.

About python

High(√) vs. Low

General(√) vs. Targetted

Interpreted(√) vs. Compiled

Aspects of languages & Common Errors

Aspects

Description

Primitive constructs

numbers, strings, simple operators

Syntax

which strings of charactres and symbols are well-formed

Static semantics

which syntactically valid strings have a meaning

Full semantics

what is the meaning associated with a syntactically correct string of symbols with no static semantic errors

语法用来描述语言中,什么表述是合法的。

静态语义表示什么程序是有意义的,哪种表达是有意义的。

完整语义即程序想达到什么目的,运行程序会产生什么效果。

Goal

Learn the syntax and semantics of a programming language.

Learn how to use those elements to translate “recipes” for solving a problem into a form that the computer can use to do the work for us.

Computational modes of thought enable us to use a suite of methods to solve problems.

References

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值