Home > 5th Grade Science > Quizzes > Grades 3, 4 and 5 - Computer Science - Elementary School - Debugging
Grades 3, 4 and 5 - Computer Science - Elementary School - Debugging
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 50% Most missed: “Ellie’s program does not work. So Ellie looks for the bug and puts it right. Ell…”

Writing algorithms is fun. Writing code is fun. When you have written all the code, you have a program. Then you try out the program. This is called executing the program. But does the program work? What if there are bugs in the program? A bug is a mistake. Often bugs are there because the codes are in the wrong order. So then you have to go through all the code to find the mistake. This is called the debugging cycle

Grades 3, 4 and 5 - Computer Science - Elementary School - Debugging
Time left 00:00
10 Questions

1. What is a mistake in a program called?
2. Programs are written. Then they are tested. Any bugs are put right. Then they are tested again until they are working properly. This is called the _________ cycle.
3. Sunil has written a program for a washing machine. The washing machine must wash, rinse and spin in that order. He writes a code:

Rinse Wash Spin

His program does not work properly. What should Sunil write?
4. Ellie is trying out a program. She is _______ it.
5. What will happen if there is a bug in Ellie’s program?
6. Ellie’s program does not work. So Ellie looks for the bug and puts it right. Ellie is _________ the program.
7. Alice has a program to make a computer do sums. There are three codes she can use:

ADD
SUBTRACT
SHOW

Alice wants the computer to add two numbers and show the result. Alice writes:

ADD SUBTRACT SHOW

There is a bug in Alice’s code. What should she write?
8. Freddy is designing toy traffic lights. He programs a toy car to stop when the lights are red and go when the lights are green. He writes this program:

Go
If Red, Go
If Green, Go

Freddy tests his program. But the car does not stop at a red light. Can you help Freddy debug his program? What should Freddy code?
9. Ellie debugs her program. It works really well all the time now. Ellie’s program is a _______.
10. Ellie thinks she has found a bug in her program. The program is to make a toy robot stop when it gets to a wall. This is the bug:

Forward
Wall?
Yes - Forward
No - Stop

Ellie corrects the code. What does she write?