Method, device, equipment and program product for programming teaching

By using the goal flowchart in programming teaching, highlighting the execution process of each node, it solves the problem that programming beginners find it difficult to understand the logical structure of the code, and improves learning efficiency and teaching effect.

CN120126352APending Publication Date: 2025-06-10BEIJING RENJIAO HOPE NETWORK INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510539269.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

When programming beginners use existing programming platforms for programming teaching, it is difficult for them to understand the logical structure of the code, resulting in low learning efficiency and poor teaching effect.

Method used

By presenting the target flowchart corresponding to the programming task, including N nodes, each node corresponds to an operation instruction, and each node is highlighted during execution, so that programming beginners can more intuitively understand the logical framework of the programming task.

Benefits of technology

It improves the efficiency of programming teaching and learning, enhances programming beginners' understanding of execution logic, and improves the effectiveness of programming teaching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120126352A_ABST
    Figure CN120126352A_ABST
Patent Text Reader

Abstract

The invention discloses a programming teaching method, device, equipment and program product, and the method comprises the steps: responding to a first request, presenting a target flow chart corresponding to a programming task, the target flow chart comprises N nodes, and the N nodes are in one-to-one correspondence with N operation instructions included in the programming task, the N nodes are connected through directed arrows according to the execution sequence of the N operation instructions, the first request is used for indicating the N operation instructions and the execution sequence of the N operation instructions, and N is a positive integer; the operation instructions corresponding to the N nodes are executed in sequence; and when the operation instruction corresponding to each node in the N nodes is executed, highlighting each node. Therefore, programming beginners more intuitively understand a logic framework of a programming task by using the flow chart closer to a human thinking mode, and clearly understand how the nodes in the target flow chart are executed step by step by sequentially highlighting the nodes, so that the learning efficiency is improved, and the programming teaching effect is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of teaching, and in particular to a method, device, equipment and program product for programming teaching. Background Art

[0002] At present, with the continuous development of computer technology, the teaching and training of computer programming is gradually being paid attention to. For example, for young children of lower age, mastering a certain degree of basic programming skills will help improve their problem-solving ability.

[0003] Generally, programming beginners can use existing programming platforms to construct codes by splicing graphical building blocks (i.e., code blocks) in order to solve programming tasks. Alternatively, programming beginners can also directly write simple codes to complete programming tasks and achieve teaching purposes.

[0004] However, when using the above teaching method to teach programming, programming beginners often lack understanding of the logical structure of the code. For example, programming beginners usually find it difficult to grasp the execution logic of the code (or code block), that is, how the code is executed and solves the programming task. As a result, the learning efficiency of programming beginners is low and the effect of programming teaching is poor. Summary of the invention

[0005] The embodiments of the present application provide a method, apparatus, device and program product for programming teaching to improve the teaching effect of programming teaching.

[0006] In a first aspect, an embodiment of the present application provides a method for programming teaching, comprising: in response to a first request, presenting a target flowchart corresponding to a programming task, the target flowchart comprising N nodes, the N nodes corresponding one-to-one to N operation instructions included in the programming task, the N nodes being connected by directed arrows in the execution order of the N operation instructions, the first request being used to indicate the N operation instructions and the execution order of the N operation instructions, where N is a positive integer; executing the operation instructions corresponding to the N nodes respectively in sequence; and highlighting each node when executing the operation instruction corresponding to each of the N nodes.

[0007] In a possible implementation, the method further includes: outputting a target code for executing the programming task according to the target flowchart.

[0008] In a possible implementation, the method further includes: when executing an operation instruction corresponding to each of the N nodes, highlighting a field in the target code corresponding to each node.

[0009] In a possible implementation, the method further includes: in response to a second request, when executing an operation instruction corresponding to a target node among the N nodes, pausing execution of the operation instruction corresponding to the target node, wherein the second request is used to indicate the target node; and outputting the value of at least one variable included in the N operation instructions.

[0010] In a possible implementation, the method further includes: in the process of sequentially executing the operation instructions corresponding to the N nodes respectively, in response to a third request, adjusting the execution speed of sequentially executing the operation instructions corresponding to the N nodes respectively, wherein the third request is used to indicate the execution speed.

[0011] In a possible implementation, the sequentially executing the operation instructions respectively corresponding to the N nodes based on the target flowchart includes: in response to a fourth request, sequentially executing the operation instructions respectively corresponding to the N nodes; the fourth request includes multiple sub-requests, and each of the multiple sub-requests is used to indicate the execution of the operation instructions corresponding to one of the N nodes.

[0012] In a possible implementation, each of the N nodes corresponds to a node type among a plurality of node types, and the plurality of node types include a start node, a process node, a judgment node, an input node, an output node, or an end node.

[0013] In a second aspect, an embodiment of the present application provides a device for programming teaching, comprising:

[0014] a display module, the display module being used to present a target flow chart corresponding to the programming task in response to a first request, the target flow chart comprising N nodes, the N nodes corresponding one-to-one to the N operation instructions included in the programming task, the N nodes being connected by directed arrows according to the execution order of the N operation instructions, the first request being used to indicate the N operation instructions and the execution order of the N operation instructions, and N being a positive integer;

[0015] An execution module, the execution module is used to sequentially execute the operation instructions corresponding to the N nodes respectively;

[0016] The display module is further used to highlight each node in the N nodes when executing an operation instruction corresponding to each node.

[0017] In a possible implementation, the device further includes an output module, and the output module is used to output a target code for executing the programming task according to the target flowchart.

[0018] In a possible implementation, the display module is further configured to highlight a field in the target code corresponding to each node when executing an operation instruction corresponding to each of the N nodes.

[0019] In a possible implementation, the execution module is also used to respond to a second request and, when executing an operation instruction corresponding to a target node among the N nodes, suspend the execution of the operation instruction corresponding to the target node, and the second request is used to indicate the target node; the output module is also used to output the value of at least one variable included in the N operation instructions.

[0020] In a possible embodiment, the device also includes an adjustment module, which is used to adjust the execution speed of sequentially executing the operation instructions corresponding to the N nodes in response to a third request during the process of sequentially executing the operation instructions corresponding to the N nodes respectively, and the third request is used to indicate the execution speed.

[0021] In a possible implementation, the execution module is specifically used to respond to a fourth request and execute the operation instructions corresponding to the N nodes respectively in sequence; the fourth request includes multiple sub-requests, and each of the multiple sub-requests is used to indicate the execution of the operation instructions corresponding to one of the N nodes.

[0022] In a possible implementation, each of the N nodes corresponds to a node type among a plurality of node types, and the plurality of node types include a start node, a process node, a judgment node, an input node, an output node, or an end node.

[0023] In a third aspect, an embodiment of the present application further provides a computing device, which may include a processor and a memory: the memory is used to store a computer program; the processor is used to execute the method described in the first aspect and any one of the implementation methods of the first aspect according to the computer program.

[0024] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the first aspect and any one of the implementation methods of the first aspect.

[0025] In a fifth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computing device, enables the computing device to execute the method described in the first aspect and any one of the implementations of the first aspect.

[0026] In the above implementation of the embodiment of the present application, in response to the first request, the target flow chart corresponding to the programming task is presented, the target flow chart includes N nodes, the N nodes correspond to the N operation instructions included in the programming task one by one, the N nodes are connected by directed arrows according to the execution order of the N operation instructions, the first request is used to indicate the execution order of the N operation instructions and the N operation instructions, N is a positive integer; the operation instructions corresponding to the N nodes are executed in sequence; when the operation instructions corresponding to each node in the N nodes are executed, each node is highlighted. In this way, each node in the target flow chart corresponds to each operation instruction for executing the programming task, and the directed arrows between the nodes indicate the execution sequence of the operation instructions during the execution of the programming task. Compared with directly writing code or using code blocks, the flow chart is closer to human thinking rather than computer language. Programming beginners can use the target flow chart to more intuitively understand the overall logical framework of the programming task, which improves the efficiency of programming teaching / learning. In addition, in the process of executing the programming task based on the target flow chart, whenever a node in the target flow chart is executed, the node will be highlighted. Furthermore, programming beginners can clearly understand how the nodes in the target flowchart are executed step by step and ultimately solve the programming task by highlighting the nodes in sequence. This further improves programming beginners' understanding of the execution logic, improves the efficiency of programming learning, and strengthens the effect of programming teaching. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0028] Figure 1 A flowchart of a method for teaching programming in an embodiment of the present application;

[0029] Figure 2 A schematic diagram of a system for programming teaching in an embodiment of the present application;

[0030] Figure 3 A schematic diagram of a highlighted implementation method in an embodiment of the present application;

[0031] Figure 4 This is a schematic diagram of the structure of a device for programming teaching in an embodiment of the present application;

[0032] Figure 5 A schematic diagram of the hardware structure of a computing device in an embodiment of the present application. DETAILED DESCRIPTION

[0033] In actual application scenarios, programming beginners can use existing different programming platforms to learn programming. For example, programming beginners can use programming platforms to write simple codes to complete programming tasks. Alternatively, programming beginners can splice graphical code blocks to achieve code construction, which can also complete programming tasks.

[0034] However, when using the above teaching method for programming teaching, programming beginners often lack understanding of the logical structure of the code. On the one hand, whether learning code or code blocks, programming beginners need to understand the grammatical logic of computer language, and the human habitual way of thinking is often difficult to understand computer language, resulting in low learning efficiency for programming beginners. For example, when it comes to the implementation form of loop / judgment code (or code block), programming beginners usually find it difficult to understand the timing logic when executing the code, that is, it is difficult for programming beginners to understand how loop / judgment statements are executed and solve programming tasks. On the other hand, codes or code blocks are static structures. When performing programming tasks according to the implementation method indicated by the code or code block, programming beginners will also be confused, that is, how the code is executed step by step and finally solves the programming task.

[0035] Based on this, in an embodiment of the present application, in response to a first request, a target flowchart corresponding to the programming task is presented, the target flowchart includes N nodes, the N nodes correspond one-to-one to the N operation instructions included in the programming task, and the N nodes are connected by directed arrows in the execution order of the N operation instructions. The first request is used to indicate the N operation instructions and the execution order of the N operation instructions, where N is a positive integer; the operation instructions corresponding to the N nodes are executed in sequence; when executing the operation instructions corresponding to each of the N nodes, each node is highlighted.

[0036] In this way, each node in the target flowchart corresponds to each operation instruction for executing the programming task, and the directed arrows between the nodes indicate the execution sequence of the operation instructions during the execution of the programming task. Compared with directly writing code or using code blocks, the flowchart is closer to human thinking rather than computer language. Programming beginners can use the target flowchart to more intuitively understand the overall logical framework of the programming task, thereby improving the efficiency of programming teaching / learning. In addition, in the process of executing programming tasks based on the target flowchart, whenever a node in the target flowchart is executed, the node will be highlighted. Furthermore, programming beginners can clearly understand how the nodes in the target flowchart are executed step by step and finally solve the programming task through the nodes that are highlighted in turn. This further improves programming beginners' understanding of the execution logic, improves the efficiency of programming learning, and strengthens the effect of programming teaching.

[0037] The following will exemplarily illustrate various non-limiting embodiments in the embodiments of the present application with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0038] Refer to Figure 1 , Figure 1 which shows a schematic flowchart of a method for programming teaching in an embodiment of the present application. This method can be executed by a processor, where the processor refers to a device with data processing and control capabilities. For example, the processor can be a graphics processing unit (GPU), a central processing unit (CPU), etc., and this is not limited. The following takes the method for programming teaching executed by a processor as an example for illustration. In actual applications, it can also be executed by other devices with data processing and control capabilities. As Figure 1 shown, the method can specifically include the following steps.

[0039] S101: The processor presents a target flowchart corresponding to the programming task in response to the first request. The target flowchart includes N nodes, and the N nodes correspond one-to-one to N operation instructions included in the programming task. The N nodes are connected by directed arrows in the execution order of the N operation instructions. The first request is used to indicate the N operation instructions and the execution order of the N operation instructions, and N is a positive integer.

[0040] Generally, the user can initiate the first request to the processor according to the programming task, and the processor presents the target flowchart corresponding to the programming task in response to the user's first request. In the embodiments of the present application, the user can be a programming beginner, a programming teacher, or other individuals mentioned above.

[0041] The target flowchart can include N nodes, where N is a positive integer. The N nodes correspond one-to-one to N operation instructions for executing the programming task, that is, each node corresponds to an operation instruction. It should be noted that each operation instruction is one of the basic operations for executing the programming task, including but not limited to instructions for starting to execute the task, calculation instructions during the task (including mathematical calculations, variable assignments, etc.), instructions for judgment operations (i.e., branch judgments), instructions for receiving inputs, instructions for outputting content, instructions for ending the execution of the task, and other instruction types. Correspondingly, each node can also be one of multiple node types such as a start node, a process node, a judgment node, an input node, an output node, or an end node.

[0042] In the target flowchart, N nodes are connected by directed arrows in accordance with the execution order of N operation instructions. Among them, the execution order of the N operation instructions refers to the execution path of the operation instructions during the process of executing a programming task, and each operation instruction can be executed once or multiple times. That is to say, one or more of the N operation instructions can be executed in a loop according to the requirements of the programming task. It can be understood that the directed arrows connecting the nodes can point from the node corresponding to the operation instruction executed first to the node corresponding to the operation instruction executed immediately after it.

[0043] As Figure 2 shown in the schematic diagram of a system for programming teaching in an embodiment of the present application. Among them, the target flowchart includes multiple nodes, and each node presents the operation instruction corresponding to the node. The nodes are connected by directed arrows to form the execution path of the operation instructions. In this way, compared with code or code blocks, the target flowchart can more clearly and intuitively reflect the overall logical framework of the programming task. For example, Figure 2 the target flowchart shown can more accurately reflect the execution process of loops and branch judgments, effectively improving the efficiency of programming teaching / learning.

[0044] The user can obtain the target flowchart presented by the processor by initiating a first request. Among them, the first request initiated by the user is used to indicate the above-mentioned N operation instructions and the execution order of the N operation instructions. Exemplarily, in Figure 2 the system shown, the user can directly input the N operation instructions and the execution order of the N operation instructions to the system to obtain the target flowchart. Or, the user can create multiple nodes using the node types available in the sidebar and enter operation instructions in the multiple nodes (i.e., a request to create the correspondence between the nodes and the operation instructions). Furthermore, the user can connect the nodes in accordance with the execution order of the operation instructions to obtain the target flowchart.

[0045] In addition, the target flowchart presented by the processor can be stored in the memory. For example, in Figure 2 the system shown, the target flowchart can be exported to the memory. Furthermore, the first request initiated by the user can also be a request to access the target flowchart in the memory. For example, in Figure 2 the system shown, in response to the "import" request, the processor can present the target flowchart.

[0046] S102: The processor sequentially executes the operation instructions corresponding to the N nodes respectively.

[0047] S103: When executing the operation instruction corresponding to each of the N nodes, highlight each node.

[0048] After presenting the target flowchart, the processor can sequentially execute the operation instructions corresponding to the N nodes in the order of the execution path indicated by the directed arrows. Specifically, the processor can sequentially execute the operation instructions corresponding to the N nodes in response to a fourth request, where the fourth request can be a request initiated by the user to execute a programming task. For example, the user can Figure 2 in the system shown trigger an "Execute" request to sequentially execute the operation instructions corresponding to the N nodes.

[0049] To sequentially execute Figure 2 the operation instructions corresponding to each node in the target flowchart shown as an example. The processor starts executing the programming task from the "Start Node" and, following the path indicated by the directed arrows, the processor sequentially executes the operation instructions corresponding to each node. Among them, when the processor executes the operation instruction "Output: {a} chickens, {b} rabbits, {c} feet", the processor can output the corresponding result to the right console according to the instruction. Finally, the processor reaches the "End Node" and completes the execution of the programming task.

[0050] Optionally, the fourth request can include multiple sub-requests, and each sub-request in the multiple sub-requests respectively instructs the processor to execute the operation instruction corresponding to one of the N nodes. It can be understood that each execution of the operation instruction corresponding to a node is in response to a sub-request from the user, that is, the fourth request is divided into multiple requests for single-step execution of operation instructions. For example, the user can initiate multiple requests for single-step execution of operation instructions to execute each operation instruction one by one.

[0051] Optionally, during the process of sequentially executing the operation instructions corresponding to the N nodes, the processor can respond to a third request to adjust the execution speed of sequentially executing the operation instructions corresponding to the N nodes, where the third request is used to indicate the execution speed. In this implementation manner, the processor does not need to gradually respond to multiple sub-requests to execute the operation instructions corresponding to each node step by step, but sequentially executes the operation instructions corresponding to the N nodes according to the execution speed indicated by the third request. Specifically, the execution speed can refer to the time required to execute the operation instruction corresponding to each node, or how many operation instructions corresponding to nodes can be executed per unit time. It should be noted that the third request can be Figure 2 one of the multiple alternative speeds predefined for the operation speed in the system shown, or the third request can be the speed value directly requested by the user, and this is not limited.

[0052] Optionally, during the process of sequentially executing the operation instructions corresponding to N nodes, the processor can support breakpoint debugging. Specifically, the processor can respond to a second request and pause the execution of the operation instruction corresponding to the target node among the N nodes indicated by the second request. It can be understood that the target node is the breakpoint requested by the user. Furthermore, the processor can output the values of at least one variable included in the N operation instructions, so that the user can intuitively feel the values of the current variables. For example, in Figure 2 the system shown, the processor can output the values of variables a, b, and c, so that the user can master the changes of the variables during the dynamic execution process. In addition, the processor can also output the values of the variables when executing the operation instructions corresponding to each node, and this is not limited.

[0053] When executing the operation instruction corresponding to each of the N nodes, the processor will highlight each node. It can be understood that when executing each node, the display effect of the node is adjusted from the initial effect to the highlighted effect, so that the user can distinguish which node's operation instruction the processor is executing at the current moment through the change of the effect. In this way, novice programmers can clearly understand how the nodes in the target flowchart are executed step by step and finally solve the programming task through the sequentially highlighted nodes. This further improves the novice programmers' understanding of the execution logic, improves the efficiency of programming learning, and strengthens the effect of programming teaching. For example, in Figure 2 the system shown, the processor is executing the operation instruction corresponding to the node "c = a × 2 + b × 4", and at the same time, the processor highlights this node.

[0054] As Figure 3 shown is a schematic diagram of different implementation methods of highlighting in the embodiments of the present application. For the node corresponding to operation 1, an outer contour can be added to the node (i.e., effect 1), or the background color of the node can be adjusted (i.e., effect 2), or the contour color of the node can be adjusted (i.e., effect 3), or the size of the node can be adjusted (i.e., effect 4), or a prominent mark can be added to the node (i.e., effect 5). Or, the processor can also adjust the contour color and background color of the node and add an outer contour to the node at the same time (i.e., effect 6). Or, the processor can highlight the node in a dynamic way, such as adding a dynamic pulse effect to the node. In addition, there can be other implementation methods for highlighting the node corresponding to operation 1, and this is not limited.

[0055] Further, the processor can also output the target code corresponding to the target flowchart for executing the programming task according to the presented target flowchart. The target code can be any computer language (such as the Python language), and there is no limitation in this regard. In this way, novice programmers can strengthen the learning effect of programming by comparing the target flowchart with the target code, laying a good foundation for novice programmers to directly write code. For example, Figure 2 The target code output by the processor according to the target flowchart is shown in the system shown.

[0056] Optionally, referring to the above, when executing the operation instructions corresponding to each of the N nodes, the processor will highlight each node, and the processor can also highlight the fields in the target code corresponding to each node. For example, in Figure 2 In the system shown, the processor is executing the operation instruction corresponding to the node "c = a × 2 + b × 4", and the processor highlights this node. At the same time, in the target code, the processor also highlights the field "c = a * 2 + b * 4" corresponding to the above node, that is, the processor adjusts the background color of this field. In addition, the processor highlighting the field corresponding to the node can also be that the processor outputs the line number of this field in the target code. Or, the processor can also highlight the field in the target code corresponding to the node through other implementation manners, and there is no limitation in this regard.

[0057] It should be noted that the above first request to the fourth request can be different ways of requests initiated by the user based on different modal systems. For example, the above requests can be initiated by the user through touch screen gesture operations, or can be initiated by the user through other external input devices such as keyboards and mice, and there is no limitation in this regard.

[0058] In addition, an embodiment of the present application also provides a device for programming teaching. Refer to Figure 4 , Figure 4 which shows a schematic structural diagram of a device for programming teaching in an embodiment of the present application, Figure 4 The device 400 for programming teaching shown includes:

[0059] A display module 401, which is configured to present a target flowchart corresponding to a programming task in response to a first request. The target flowchart includes N nodes, and the N nodes are in one-to-one correspondence with N operation instructions included in the programming task. The N nodes are connected by directed arrows in the execution order of the N operation instructions. The first request is used to indicate the N operation instructions and the execution order of the N operation instructions, and N is a positive integer;

[0060] The execution module 402 is configured to sequentially execute the operation instructions corresponding to the N nodes respectively;

[0061] The display module 401 is further configured to highlight each of the nodes when executing the operation instruction corresponding to each of the N nodes.

[0062] In a possible implementation manner, the apparatus further includes an output module 403, and the output module 403 is configured to output target code for executing the programming task according to the target flowchart.

[0063] In a possible implementation manner, the display module 401 is further configured to highlight the fields corresponding to each of the nodes in the target code when executing the operation instruction corresponding to each of the N nodes.

[0064] In a possible implementation manner, the execution module 402 is further configured to, in response to a second request, pause executing the operation instruction corresponding to a target node when executing the operation instruction corresponding to the target node among the N nodes, where the second request is used to indicate the target node; the output module 403 is further configured to output the values of at least one variable included in the N operation instructions.

[0065] In a possible implementation manner, the apparatus further includes an adjustment module 404, and the adjustment module 404 is configured to, during the process of sequentially executing the operation instructions corresponding to the N nodes respectively, in response to a third request, adjust the execution speed of sequentially executing the operation instructions corresponding to the N nodes respectively, where the third request is used to indicate the execution speed.

[0066] In a possible implementation manner, the execution module 402 is specifically configured to, in response to a fourth request, sequentially execute the operation instructions corresponding to the N nodes respectively; the fourth request includes a plurality of sub-requests, and each of the plurality of sub-requests is used to indicate to execute the operation instruction corresponding to one of the N nodes.

[0067] In a possible implementation manner, each of the N nodes corresponds to one of a plurality of node types, and the plurality of node types include a start node, a process node, a judgment node, an input node, an output node, or an end node.

[0068] It should be noted that, for the information interaction, execution process, etc. among the above-mentioned modules and units of the apparatus, since they are based on the same concept as the method embodiments in the embodiments of the present application, the technical effects brought by them are the same as those of the method embodiments in the embodiments of the present application. For the specific content, reference may be made to the description in the foregoing method embodiments shown in the embodiments of the present application, and details are not described herein again.

[0069] In addition, an embodiment of the present application further provides a computing device. Refer to Figure 5 , Figure 5 which shows a schematic diagram of the hardware structure of a computing device in an embodiment of the present application. As Figure 5 shown, the computing device 500 may include a processor 501 and a memory 502.

[0070] Among them, the memory 502 is used to store a computer program;

[0071] The processor 501 is used to execute the method for programming teaching described in the above method embodiment according to the computer program.

[0072] In addition, an embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the method for programming teaching described in the above method embodiment.

[0073] In addition, an embodiment of the present application further provides a computer program product containing instructions. When it runs on a computing device, it causes the computing device to execute the method for programming teaching described in the above method embodiment.

[0074] In the embodiments of the present application, the "first" in names such as "first request" is only used as a name identifier and does not represent the first in order. This rule also applies to "second", "third", etc.

[0075] From the description of the above embodiments, those skilled in the art can clearly understand that all or part of the steps in the above method embodiments can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of the present application.

[0076] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method embodiments. The apparatus embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative efforts.

[0077] The above description is only an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A method for teaching programming, characterized in that: The method comprises: In response to the first request, presenting a target flow chart corresponding to the programming task, the target flow chart comprising N nodes, the N nodes corresponding one-to-one to the N operation instructions included in the programming task, the N nodes being connected by directed arrows according to the execution order of the N operation instructions, the first request being used to indicate the N operation instructions and the execution order of the N operation instructions, and N being a positive integer; Execute the operation instructions corresponding to the N nodes respectively in sequence; When the operation instruction corresponding to each of the N nodes is executed, each of the nodes is highlighted.

2. The method according to claim 1, characterized in that The method further comprises: According to the target flow chart, target code for executing the programming task is output.

3. The method according to claim 2, characterized in that The method further comprises: When executing the operation instruction corresponding to each of the N nodes, the field corresponding to each node in the target code is highlighted.

4. The method according to claim 1, characterized in that: The method further comprises: In response to a second request, when executing an operation instruction corresponding to a target node among the N nodes, suspending execution of the operation instruction corresponding to the target node, wherein the second request is used to indicate the target node; Output the value of at least one variable included in the N operation instructions.

5. The method according to any one of claim 1, characterized in that: The method further comprises: In the process of sequentially executing the operation instructions respectively corresponding to the N nodes, in response to a third request, an execution speed of sequentially executing the operation instructions respectively corresponding to the N nodes is adjusted, and the third request is used to indicate the execution speed.

6. The method according to any one of claim 1, characterized in that: The executing the operation instructions corresponding to the N nodes respectively in sequence based on the target flow chart includes: In response to the fourth request, executing the operation instructions corresponding to the N nodes respectively in sequence; The fourth request includes multiple sub-requests, and each of the multiple sub-requests is used to instruct the execution of an operation instruction corresponding to one node among the N nodes.

7. The method according to any one of claims 1 to 6, characterized in that: Each of the N nodes corresponds to a node type among a plurality of node types, and the plurality of node types include a start node, a process node, a judgment node, an input node, an output node or an end node.

8. A device for teaching programming, characterized in that: The device comprises: a display module, the display module being used to present a target flow chart corresponding to the programming task in response to a first request, the target flow chart comprising N nodes, the N nodes corresponding one-to-one to the N operation instructions included in the programming task, the N nodes being connected by directed arrows according to the execution order of the N operation instructions, the first request being used to indicate the N operation instructions and the execution order of the N operation instructions, and N being a positive integer; An execution module, the execution module is used to sequentially execute the operation instructions corresponding to the N nodes respectively; The display module is further used to highlight each node in the N nodes when executing an operation instruction corresponding to each node.

9. A computing device, characterized in that The computing device comprises a processor and a memory: The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 7 according to the computer program.

10. A computer program product comprising instructions, characterized in that When the method is executed on a computing device, the computing device is caused to execute the method according to any one of claims 1 to 7.