【MIT 公开课】Computer Science and Programing Lession1

来源:互联网 发布:servlet源码包下载 编辑:程序博客网 时间:2024/05/19 03:42

学完python基本语法,并且写了一些关于爬虫的小程序后,深刻的觉得在编程思维上很是欠缺。发现在网易云课堂有一个使用python语言讲解的Computer Science and Programing 的MIT公开课,所以决定跟着学完全部课程,并在博客上做好记录。
公开课地址 :
网易云课堂http://study.163.com/plan/planIntroduction/1222079.htm
MIT该课程主页
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/index.htm
学习完一课后,主页上有相关习题,可以加以复习。
Lission1:
1.What is the difference between declarative and imperative knowledge?
Answer:
declarative knowledge is something like definition. such as “the square of x is y, so y is positive number.”
imperative knowledge is something like recipe. such as “how to get the square of x.”
the answer for reference form MIT is:
Declarative knowledge is statements of fact; imperative knowledge is “how to” knowledge.
2.What is the advantage of a stored-program computer?
answer:
the stored-program computer can give us some instruction to solve many different questions.
the answer for reference form MIT is:
It’s far more versatile than a fixed-program computer, science it’s interprets program given to it and carries out those instructions, as opposed to being built to do one things..
3.What are the syntax, static semantics, and semantics of a language?
answer:
syntax is mean that we must write a string with an rule.
static semantics is mean that the string must has meaning.
semantics is mean that the sentence must has meaning.
the answer for reference form MIT is:
Syntax determines whether a string is legal, static semantics determine whether the string has meaning, and semantics assigns a meaning to a legal sentence (assuming no static semantic errors.
4.What sorts of errors can occur in a program?
answer:
the Variable is not being defined. the Array boundary
the answer for reference form MIT is:
Crash, run forever or give a wrong answer.

0 0
原创粉丝点击