What is the difference between an algorithm and a program? The algorithm is a concept, the program is the concrete implementation of the algorithm
The computational thinking pattern means that everything can be seen as a mathematical problem involving numbers and formulas.
Two things that any computer can do is calculate and save results.
Memory: Ram
Alu (Arithmetic logic unit): Do some primitive operation
Control unit: Track event flow
Step: When reading a code or program, the control unit creates a set of instructions in memory. In the control unit, there is a special thing called the program counter. It starts with the first instruction in the sequence of instructions, and when we let the program run, it starts executing when the interpreter starts executing the program. The typical behavior of this instruction would be to take a value out of memory, put it in the ALU for calculation, and then put it back into memory. When finished, the program counter is incremented by 1, which means it points to the next instruction and then executes that instruction. Once again, the command accesses values from within, puts them into the ALU, makes simple calculations, and then saves them back into memory. Every time, it gets a test order. It will do a simple test. If the test result is true, the test changes the program counter, causing the system to jump back or jump to the other part of the code and change where the program executes. It will keep doing this until it reaches a point in time to complete the program and output the final result.
Introduction to Computer science and Python programming Week1