day1 Summary

Today's classroom Summary:

python basis:
a programming language
1. What is the programming language?

Expression can be recognized by a computer programming language mentioned above, i.e., language communication medium, and a computer programming language to communicate with a programmer medium. In the programming world

Sector, the computer is more like a slave to the purpose of human programmed to command the slaves to work.

2. What is programming?

Programming that is based on the needs of programmers to write down their thoughts flow in accordance with the syntax of a programming language style, the result is the output file that contains a bunch of characters.

Stressed: no different from an ordinary program file before is not running, the characters only at run time, the paper wrote only specific grammatical meaning.

Second computer component of the
    CPU
    memory,
    external memory
    input device
    output device
three python installation and use
    1. Install the python interpreter
    2. Install pycharm editor
    3. Write python code, and outputs the print hello world!
Four Variable
    amount may change.
    Variable value: true to store a memory address in memory.
    Variable name: variable values for binding relationship.
    = Number assignment: to bind the value of the variable to the variable name.
Five constants
    can not change the amount.
    Named to all uppercase.
    Not can not modify them, but everyone who ordained all uppercase variables are called constants, can not be modified.
Six user to interact with the program
    input:
        the INPUT ()
    Output:
        Print ()
seven formatted output
    Dear customer, hello! Your month deducted 99 yuan bill, left 0.
    # By some placeholder character for a location in the replacement string.
    Placeholder:
        % s: can replace any type of
        % d: numeric type can replace
    Example:
        Dear User, Hello! Your phone bill this month deducted yuan% s,% d remaining yuan.
Eight basic data types
    1. Digital Type:
        Integer: int
        float: a float
    2. string type
        action: the name, sex, nationality, address, and other description information
        defined: in single quotes \ double quotes \ three marks by a characters string
            name = 'tank'
        priority control operation:
            1, according to the index value (forward + reverse take take): can only take
            2, sections (care regardless of the end, step)
            3, the length len
            . 4, members and in operation in Not
            . 5, the blank is removed Strip
            . 6, segmentation Split
            . 7, the cycle
        need to know:
            . 1, Strip, the lstrip, the rstrip
            2, Lower, Upper
            . 3, startsWith, endsWith
            4, format three games are played
            . 5, Split, rsplit
            . 6, the Join
            . 7, Replace
            . 8, isdigit

 

Guess you like

Origin www.cnblogs.com/Raywarriors/p/11080120.html