Programming
Programming / Bachelor of interactive spatial design
Week1
This class focused on the basic concepts of computers and programming. It covered computer hardware and software, data storage methods, program operation principles, and the Python programming language. The aim was to help students build a basic understanding of computer programming.
1.Basic Concepts of Computers
Computers work according to program instructions. A program is a set of instructions for a computer to perform tasks, also known as software. People who write programs are called programmers or software developers.
2.Hardware and Software
Hardware refers to the physical devices that make up a computer. It includes the CPU, main memory, auxiliary storage devices, and input/output devices. The CPU runs programs. The main memory (RAM) stores programs and data temporarily when the program is running. Auxiliary storage devices can store data for a long time. Input/output devices are used for data input and output. Software is divided into application software and system software. Application software is for daily tasks. System software manages and controls the basic operations of the computer.
3.Data Storage Methods
Computers store all data as sequences of 0s and 1s. One byte consists of 8 bits and can store a letter or a small number. Computers use binary to store numbers. Characters are converted into numbers for storage through encoding, such as ASCII and Unicode. In addition, computers use specific encoding schemes to store negative numbers and real numbers. Digital images and music are also stored by converting their elements (pixels, samples) into binary numbers.
4.Principles of Program Operation
The CPU performs simple data operations and understands machine language instructions. When a program runs, it needs to be copied from the auxiliary storage to the RAM. The CPU works in a cycle of fetching, decoding, and executing. Programming languages have evolved from machine language to assembly language, and then to high-level languages. High-level languages are converted into machine language by compilers or interpreters. Python uses an interpreter to translate and execute code line by line.
5.The Python Programming Language
Before using Python, you need to install and configure it. The installation includes the Python interpreter. The interpreter has two modes: interactive and script. The interactive mode is good for learning, while the script mode is for creating programs. IDLE is the integrated development environment for Python, providing tools for writing, executing, and testing programs.
Week 2
Labour Day (Pubilic holiday)
Comments
Post a Comment