Video Of Day

Coursera: Code Yourself! An Introduction to Programming (Week 1 Quiz Answer)

1. Which of the following is an algorithm?


  • ✅ How to make a cup of tea: Put a teabag in a cup, If you don’t have any hot water, boil some, Pour the hot water into the cup, Wait for 3 minutes, Remove the teabag from the cup
  • Is it raining?
  •  Shopping List: milk, bread, sugar
  • Tidy your room!

2. Which programming construct can you identify in this algorithm for making breakfast?

Take a clean bowl
Pour 125ml of milk in the bowl
Add 30gr of cereal in the bowl
Take a clean spoon
Stir the milk and cereal

  • ✅ Sequence
  • Selection
  • Iteration
  • None of the above

3. Please use a pen and paper and follow the algorithm below. Which letter will be drawn?

Position the pen at the top right part of the page
Draw a horizontal line
From the middle point of this line draw a vertical line downwards, until it reaches the bottom part of the page
  • I
  • L
  • ✅ T
  • C

4. The following algorithm:

  1. turn the tap on
  2. wet your hands
  3. apply some soap on your hands
  4. lather and scrub your hands
  5. rinse your hands
  6. turn the tap off
  7. dry your hands
describes the process for:

  • cleaning the kitchen
  • washing clothes
  • ✅ washing your hands
  • washing the car
Correct: washing your hands

5. We have created a new project in Scratch and we have defined the following program for the cat:



We have chosen the following rotation style for the cat:


What happens when we execute this program?
  • The cat keeps moving and every time it bounces it flips to the other direction, so if it was initially facing right it will then face left.
  • The cat keeps moving and every time it bounces its image turns upside down.
  • The cat keeps moving and every time it bounces its image stays the same.
  • The cat stands still.

Ans not Available 

6. The following flowchart depicts an algorithm for leaving your house on a winter’s day. Which of the following are not valid execution paths?



  • Take the keys, exit the flat.
  • Take the keys, put a scarf on, exit the flat.
  • Take the keys, take an umbrella, put a scarf on, exit the flat.
  • ✅ All the above options are valid execution paths.

7. We want to create a program where the cat keeps moving all the time and bounces whenever it touches the edge of the screen. If at any point the cat touches something green, the cat should change colour. Which of the following scripts captures this?

8. In a new project, we have created the following program for the cat:



When we run this program, the cat first points to the right and it is located at -200, 0. What happens next?

  • It will keep moving to the left, and whenever it touches the edge, it will be repositioned at -200,0.
  • ✅ It will keep moving to the right, and whenever it touches the edge, it will be repositioned at -200,0.
  • It will keep moving to the right, and whenever it touches the edge, it will be repositioned at the centre of the stage.
  • It will move 10 steps to the right, and if it is touching the edge, it will disappear from the screen.

9. Let’s suppose that in the project for “Sunny Day” the stage background looked like this, so the sun is located on the right:



The program for the cloud in the original “Sunny Day” project (where the sun was located on the left) is the following:


We want to modify the original program so that the cloud is initially placed on the right and every time we blow, it moves to the left. To do this, we need to:
  • within the condition, increase the value of the sound intensity, e.g. 100
  • set the block "point in direction” to -90
  • ✅ set the coordinates in the "go to" block to x: 200, y: 105, and set the block "point in direction” to -90
  • set the coordinates in the "go to" block to x: 200, y: 105

10. We have created an animation with two characters, Tim and Lucy. Tim’s code is:



Lucy’s code is:


According to this program, will Tim and Lucy have a normal dialogue when we click the green flag?
  • No, Tim talks first, saying all his lines, and then Lucy talks, saying all her lines.
  • No, Tim and Lucy will talk at the same time.
  • ✅ No, Lucy talks first, saying all her lines, and then Tim talks, saying all his lines.
  • Yes, Tim and Lucy will have a normal dialogue.

No comments