Blue Bridge Cup Xiaobai Must-See——Python

Blue Bridge Cup Xiaobai Must-See——Python


1. Python competition rules

Competition rules link on the official website of the competition (downloadable): https://dasai.lanqiao.cn/notices/846/

It is worth noting that:

  1. Competition compilation environment: must be the IDLE environment of Python 3.8.6
  2. The range of algorithms investigated:
    (1) Computer algorithms: enumeration, sorting, search, counting, greedy, dynamic programming, graph theory, number theory, game theory, probability theory, computational geometry, string algorithms, etc. (2) Data structure:
    array , object/structure, string, queue, stack, tree, graph, heap, balanced tree/line segment tree, complex data structure, nested data structure, etc.
  3. Python third-party libraries are not available, only the standard library that comes with Python can be used
  4. Inspection method: fill in the blanks and programming questions
  5. Game time: 4 hours

2. The IDLE environment of Python3.8.6

1. Official website download address

https://www.python.org/downloads/
insert image description here

2. Tell the compiler to display the line count

Open the Python compiler, click Configure IDLE in the Options drop-down bar,
insert image description here
select General, check Show line numbers in new windows, and finally click OK
insert image description here

3. Set auto save

insert image description here

4. Set the page font size

After selecting Fonts/Tabs, you can set the font style and font size according to your preferences
insert image description here

5. Use of shortcut keys

(1) Autocomplete code: Tab key
(2) Run: F5
(3) Add comment: Alt + 3
(4) Go to comment: Alt + 4
(5) Undo the previous step: Clt + Z
(6) Add indentation : Clt + [
(7) To indent: Clt + ]
(8) View the user manual: F1
insert image description here
**Note: **In addition, we can debug the code in the Python shell, which can be opened in Run.
insert image description here
There are two The commonly used shortcut keys are:
(1) Change the previous command: Alt + p
(2) Change the next command: Alt + N

3. Suggestions for preparation

1. The first stage (Python Xiaobai)

For beginners in Python who are participating in the competition for the first time, it is recommended to go to the Chinese MOOC to learn the Python courses of Beijing Institute of Technology , as well as the use of all Python keywords, functions, and standard libraries in the rookie tutorials . It is enough to learn it quickly, and you can record some notes appropriately for future use in brushing the questions.

2. The second stage (Python beginners)

It is also recommended to search for "Python Cabin" on WeChat to obtain the software for solving questions, and do at least 10 questions every day for at least one month to accumulate a sense of questions.

3. The third stage (Python advanced)

Go to the official website of Lanqiao to brush real questions and learn data structures and algorithms that you don’t understand

Recommended learning video: Python data structure at station b (Tsinghua University)

More articles about Blue Bridge Python preparations will be published in the future! ! !

Guess you like

Origin blog.csdn.net/weixin_45536765/article/details/128667963