伯克利 CS61A 课堂笔记 01 —— Computer Science

01 What is Computer Science?

伯克利 CS61A 课堂笔记 01 —— Computer Science_第1张图片

02 What is This Course About?

A course about managing complexity 管理复杂度

        Mastering abstraction

        Programming paradigms

An introduction to programming 编程介绍

        Full understanding of Python fundamentals

        Combining multiple ideas in large projects

        How computers interpret programming languages

Different types of languages: Scheme & SQL

03 Course Politics

Learning + Community + Course Staff

04 Demo

2022
2000 + 22

abs(-2) //绝对值函数

'Go Bears'
'gob' + 'ears'

shakes = open('shakespeare.txt')
text = shakes.read().split()

len(text) //长度
text[:25] //前25个单词 + 标点

text.count('our') //统计
text.count('.')
text.count('.') / len(text)

words = set(text) //集合 不重复
len(words)

{w for w in words if len(w) == 4}
'draw'[::-1] //翻转
{w for w in words if len(w) == 4 and w == w[::-1]}

附:词汇解释

computation 计算、dialog / ˈdaɪəlɔːɡ / 对话、paradigm / ˈpærədaɪm / 范式、fundamental / ˌfʌndəˈment(ə)l / 基本原理、multiple 多种的、split 拆分

你可能感兴趣的:(CS61A笔记,笔记,python)