Draw This - beginner
Draw a flowchart that shows the step-by-step process of debugging a simple program that does not print the expected output.
Draw a flowchart that shows the step-by-step process of debugging a simple program that does not print the expected output.
+---------------------+
| Start |
+----------+----------+
|
v
+---------------------+
| Identify the problem |
+----------+----------+
|
v
+---------------------+
| Reproduce the error |
+----------+----------+
|
v
+---------------------+
| Check the code lines |
+----------+----------+
|
v
+---------------------+
| Make a small change |
+----------+----------+
|
v
+---------------------+
| Test the program |
+----------+----------+
|
v
+---------------------+
| Does it work now? |
+----------+----------+
/ \
/ Yes \ No
v v
+----------+ +---------------------+
| End | | Go back to check |
+----------+ | the code lines |
+----------+----------+
|
v
(loops back to "Make a small change")This flowchart shows the debugging mindset as a step-by-step process:
This loop continues until the program works correctly.
debugging mindset when working with code?# symbol to start a comment line.#, which is correct. Others are comment styles for HTML, JavaScript, or C.def add_numbers(a, b):
return a + b
result = add_numbers(3, '4')
print(result)let count = 0;
for(let i = 0; i < 5; i++) {
count = count + i;
}
console.log(count);count is updatedcount is reset to 0 inside the loop each time, it never accumulates.count inside the loop causes it to stay 0 after loop ends.count is reset inside the loop -> Option DPass the test and this pattern moves unknown