Why is there information but I can't read Python by myself? 【Lebo software test】

Come on, let's put the picture of Python official website first, and see if you can learn it and understand it:

insert image description here

It's all in English, all in professional terms. This is the content of the official Python website. If you want to understand, you not only need to know English, but also need to understand some professional terms before you can continue to learn. It's really complicated. Who is in the mood to learn, and replace the dense documents in Chinese, it is estimated that not many people can read it.

So what do we need to do, how should we learn, and put a learning mind map:

insert image description here

Some people may have said that, after reading a little, you can't watch it at all. You need to make python interesting and write some interesting things, such as games. You can write some small games by yourself, play by yourself, come and come, and give you a 2048 A little game I wrote,

Come and play with everyone, put the code, and let's go:

import random
from data import *

def ResetTable():
    number_table.clear()
    for i in range(XLine * YLine):
        number_table.append(0)
    x = random.randint(0, XLine * YLine - 1)
    y = random.randint(0, XLine * YLine - 1)
    while y == x:
        y = random.randint(0, XLine * YLine - 1)
    number_table[x] = random.randint(1, 2) * 2
    number_table[y] = random.randint(1, 2) * 2

def CheckLose():
    for i in range(XLine):
        for j in range(YLine):
            if number_table[i * XLine + j] == 0:
                return False
            elif i != 0 and number_table[i * XLine + j] == number_table[(i - 1) * XLine + j]:
                return False
            elif j != 0 and number_table[i * XLine + j] == number_table[i * XLine + j - 1]:
                return False
            elif i != XLine - 1 and number_table[i * XLine + j] == number_table[(i + 1) * XLine + j]:
                return False
            elif j != YLine - 1 and number_table[i * XLine + j] == number_table[i * XLine + j + 1]:
                return False
    return True

def CheckWin():
    for i in range(XLine * YLine):
        if number_table[i] >= GoalToWin:
            return True
    return False

This is a part of the code, let's have an appetizer first, you can find me if you need it, and I will give you the complete source code.

I play this game of my own, I can do whatever I want to get the cheat, and then you will think, I don't want to play alone, I want to play with multiple people, how to put him on the server. . . .

In addition to this direction, we can also think that we can directly use code to complete automated operations, and everything we want to accomplish can be run directly and automatically, so exciting, what do we need for automation, selenium/unittest/. . . . Using these two tools, I can change one by one with my hands to control the automatic operation with code. Do I need to operate the code again? Come and continue to put the code.
insert image description here

Give the source code for free, if you are interested, you can ask me for it~

Guess you like

Origin blog.csdn.net/leboxy/article/details/110824702