Dark horse base 01

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

  1. variable

    Memory for storing container data, which program is used to process data

    Naming rules:

    1. Variable names can be any combination of letters, numbers or underscore
    2. The first character variable names can not be digital

    Written by:

    1. hump
    2. Underline
  2. Export

    • % S output string
    • % D signed decimal integer
    • f '' {} '' {} are variable discharge
    例:
        test = input('请输入整数:')
        aa = "我有%s岁了" % test
  3. Arithmetic Operators

    • Order of priority: **higher * / % //than+ -
    • Commonly used () to process the priority
  4. 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

Guess you like

Origin www.cnblogs.com/xiaobai686/p/12075184.html