SJSU/Udacity CS046

Lesson 1 - Introduction

  1. Introduction
  2. Introducing Kylie
  3. What is Programming
  4. Java
  5. Quiz: Hello, World
  6. Installing BlueJ
  7. Download Code for the Course
  8. Hello, Udacity!
  9. Creating a Test Project
  10. Quiz: Hello World, Two Lines
  11. Quiz: Text and Numbers
  12. Our First Program
  13. Quiz: print and println
  14. Quiz: Errors
  15. Quiz: Compile-Time and Runtime Errors
  16. Quiz: Compile-Time and Runtime Errors 2
  17. Kylie's Advice When You Run into Errors
  18. Quiz: Algorithms
  19. Quiz: Algorithms 2
  20. Quiz: Tidying Legos
  21. Quiz: What Does This Pseudocode Print?
  22. Quiz: Another Pseudocode Example
  23. Quiz: Move to the First Yellow-Blue Lego
  24. Quiz: Why Is This Not a Correct Algorithm?
  25. Quiz: What Does This Algorithm Do?
  26. Quiz: Kylie's Advice for You
  27. Congratulations!

Quiz: Move to the First Yellow-Blue Lego

Drag the following lines of code to the left and produce the algorithm. Pay attention to the indentations. One of the lines is not useful.


.move all the way to the left
.while not found
. if the piece you're looking at is blue
.  move one space right
. else if the piece to the right is blue
.  stop you found it
. else if the piece to the right is yellow
.  move one space right
-move all the way to the right

Problem on this page?

Your name:

Your email address:

Problem description:

To protect against spam robots, please answer this simple math problem:
× =