table of Contents
Dark Horse 01
1. Principles of Computer Organization
- The computer system consists of software and hardware system components
- The role of the operating system
- Using the control and management of system resources
2.python Basics
variable
Memory for storing container data, which program is used to process data
Naming rules:
- Variable names can be any combination of letters, numbers or underscore
- The first character variable names can not be digital
Written by:
- hump
- Underline
Export
- % S output string
- % D signed decimal integer
- f '' {} '' {} are variable discharge
例: test = input('请输入整数:') aa = "我有%s岁了" % test
Arithmetic Operators
- Order of priority:
**
higher*
/
%
//
than+
-
- Commonly used () to process the priority
- Order of priority:
Data type conversion
-
int(x [,base ]) The integer x is converted to a complex(real [,imag ]) Create a complex, real is real, imag imaginary part num1 = int(str1, 8) # 第二个参数为8,表示按8进制转换后显示,结果为 8
- Other types of conversion
-