What a bug is and simple strategies kids can use to find and fix mistakes in their code.
24 cards · basic cards · AI-written, checked twice. Edit anything.
- What is a bug in computer code?
- A mistake or error that makes the program not work as planned.
- What is a syntax error?
- A mistake in how you write the code, like wrong punctuation, spelling, or symbols.
- What is a logic error?
- The code runs but does not do what you wanted it to do.
- What is a print statement?
- A command that shows a message on the screen to help you see what your code is doing.
- What does it mean to test your code?
- Running your code to see if it works the way you expect.
- What should you check first when code does not work?
- Read the error message to see what went wrong.
- What is rubber duck debugging?
- Explaining your code out loud to a rubber duck or anyone to find your own mistake.
- What is a variable in code?
- A container that stores a value you use in your program.
- What happens if you misspell a variable name?
- The code may not work because the computer cannot find that variable.
- What is an infinite loop?
- A loop that never stops running because the ending condition is never true.
- Why should you write one small part of your code at a time?
- So you can test each part and find bugs more easily.
- What does an off-by-one error mean?
- When your count or loop goes one number too high or too low.
- What should you do before making big changes to your code?
- Save a copy of the version that worked.
- What is a compile error?
- An error that happens when the computer tries to read your code because the code is not written correctly.
- What is a runtime error?
- An error that happens while your program is running.