Course material
|
Overview & history
hardware vs. software, von Neumann architecture
historical generations
mechanical -> vacuum tube -> transistor -> IC -> VLSI -> parallel/networks
evolution of programming
machine language -> assembly language -> high-level language
Programming in Scratch
programming concepts
simple actions: move, turn, next-costume, ...
repetition: forever, repeat, ...
conditional execution: if, if-else, repeat-until
logic: =, >, <, and, or, ...
arithmetic: +, -, *, /, ...
sensing: touching?, key-pressed?, ...
variables: set, change-by, ...
coordination: broadcast, when-I-receive, ...
Programming in Python
Python interpreter, IDLE shell
data types
numbers (int, float), operators (+, -, *, /, //, **, %)
strings, operators (+, *)
Booleans (True, False)
type function, conversion (int, float, str)
variables
variable names, naming conventions, reserved words
assignment statements, shorthand assignments
functions
parameters, return statements, doc strings
built-in functions (print, abs, max, min)
modules, import statement
random module (randint, choice), math module (sqrt, floor, ...)
turtle module (forward, left, right, ...)
I/O
print function
mixing text and variables, separating spaces
input function
prompt message, converting input to a number
conditional execution
if statement, Boolean operators (<, <=, >, >=, ==, !=, and or, not)
if (1-way), if-else (2-way), cascading if-else, elif (multi-way)
repetition
for loops, counter-driven
range function, sums & counters
while loops, condition-driven
infinite (black hole) loops
|