• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
LvGJ
沉迷学习不秃头
博客园    首页    新随笔    联系   管理    订阅  订阅
MIT6.00x Week1

MIT6.00x Week1

  1. binding variables and values

    In this section, each values were stored in the computer memory,besides,in computer it also have a variables list,each one are bind with a value.

    If a variable was be gave a number before, then you change it's composition,the result before may not change。For example,When we calculate the area,in the frist time,the answer is 10.0,but after calculating,I change the radius to another value ,the area will not change

  2. int

  3. float

  4. bool

  5. NoteType

  6. string

  7. if elif else

  8. while control the flow

    n = 0

    while n<1

    ​ print(n)

    ​ n = n+1

  9. for loop

    for n in range(3):

    ​ ...

WHAT DOES A COMPUTER DO

  1. calculation
  2. remember result

TYPES OF KNOWLEDGE

  1. declarative knowledge

statements of fact.陈述事实

  1. imperative knowledge

a recipe or “how-to” knowledge
一个东西具体怎么做

BASIC MACHINE ARCHITECTURE

SCALAR OBJECTS 标量

  1. int
  2. float
  3. bool
  4. NoneType
  5. 可以使用type()获取对应的类型
  6. 强制转换,int(3.4)

OPERATORS ON ints and floats

  1. /
  2. // ---int division整数除法
  3. % mod
  4. ** pow

COMPARISON OPERATORS ON int and float

  1. i>j
  2. i<j
  3. i>=j
  4. i<=j
  5. i==j
  6. i!=j

BRANCHING PROGRAMS

x = int(input('Enter an integer: '))
if x%2 == 0:
	print(‘’)
	print('Even')
else:
	print(‘’)
	print('Odd')
print(’Done with conditional')

LOGIC OPERATORS ON bools

  1. not a
  2. a and b
  3. a or b

vacabulary

  • scalar 标量
  • proportions 比例
  • components 成分
  • concatenated 串联
  • prompt 促使
  • conon 冒号
  • metaphors 隐喻
posted on 2020-06-10 10:50  LvGJ  阅读(198)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3