Introduction to Computer science and Python programming Week1

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.