USUS UKUKIndiaIndia

Every Question Helps You Learn

Join Us
Streak
Leading Streak Today
Your Streak Today
Streak
Leading Streak Today
Your Streak Today
Writing Code - 2
Walking is easy for us but can you make a character on a computer screen walk?

Writing Code - 2

This Computer Science quiz is called 'Writing Code - 2' and it has been written by teachers to help you if you are studying the subject at elementary school. Playing educational quizzes is an enjoyable way to learn if you are in the 3rd, 4th or 5th grade - aged 8 to 11.

It costs only $12.50 per month to play this quiz and over 3,500 others that help you with your school work. You can subscribe on the page at Join Us

Tom has a character on his computer screen. The character is called Henry. Tom wants to animate Henry and make him walk around the screen. What code is Tom writing to make Henry walk? Remember, all the steps in a program have to be in the correct order.

1.
Henry is stood up on two legs. Tom wants Henry to start walking with his left leg.

What code does Tom use?
Left Forward 1
Left Back 1
Right Forward 1
Right Back 1
Henry has put his left leg forward
2.
The right leg now needs to move twice as far. Then it will be in front of the left leg.

What does Tom code?
Right Forward 1
Right Forward 2
Left Forward 1
Left Forward 2
Henry is now walking
3.
Next, Henry needs to swing his left leg forwards. It must go in front of the right leg.

What does Tom code?
Left Forward 2
Left Back 2
Right Forward 2
Right Back 2
Henry is walking really well!
4.
Now, Henry’s right leg needs to go in front of his left leg. Tom codes:
Stop
Run
Right Forward 2
Left Forward 2
There is a pattern - left, right, left, right
5.
Tom wants Henry to keep walking forwards. Which one of these keeps Henry walking?
Left Forward 2 Right Back 2
Left Back 2 Right Back 2
Right Back 2 Left Back 2
Left Forward 2 Right Forward 2
Tom is pleased: Henry is walking
6.
Tom can keep writing: Left Forward 2 Right Forward 2 again and again.

But there is a lot to write down. So, Tom gives these codes a name. He calls them Walk.

Now when Tom just writes Walk, what does Henry do?
Takes two steps forwards
Takes two steps backwards
Stops
Turns round
Now Tom can just type Walk and Henry takes two steps forwards
7.
Tom wants Henry to move two steps forward and then stop. What should he code?
Walk Walk
Walk Run
Stop Walk
Walk Stop
Henry stands on the spot
8.
Tom wants Henry to walk forward two steps, turn right, walk forward two more steps, then stop. What does Tom code?
Walk Walk Right Stop
Walk Right Stop Walk
Right Walk Walk Stop
Walk Right Walk Stop
Henry has gone round a corner
9.
Tom now wants Henry to go forward two steps, turn left, walk forward two steps, then turn left again, and then stop.

What code does Tom use?
Walk Left Walk Right Stop
Walk Left Walk Left Stop
Left Walk Walk Left Stop
Walk Right Walk Right Stop
Tom is getting good at controlling Henry
10.
Tom’s codes must be in the right _____.
Colour
Sound
Order
Size
Tom’s codes must be in the right order - they must be in the correct sequence
Author:  David Bland

© Copyright 2016-2024 - Education Quizzes
Work Innovate Ltd - Design | Development | Marketing

We use cookies to make your experience of our website better.

To comply with the new e-Privacy directive, we need to ask for your consent - I agree - No thanks - Find out more