Pseudocode practice quiz

Just learning to code? Is the language getting in your way? Give this pseudocode practice quiz a shot and see how well you think algorithmically.

What is output from the following code?

a = 2
loop while a < 10
   print a + " "
   a = a + 2
 
 
 
 
 

What is output from the following code?

x = 10
sum = 0
loop while x > 3
   sum = sum + x
   x = x - 2
print sum
 
 
 
 
 

What is output from the following code?

x = 10
loop while x > 85
   x = x - 5
print x
 
 
 
 
 

What is output from the following code?

x = 15
if x > 15 
   print "go"
if x < 20 
   print "stop"
 
 
 
 

What is output from the following code?

x = 20
loop while x > 10
   x = x - 4
print x
 
 
 
 
 

Question 1 of 5

Why ClassCube?

Are you spending too much time grading your students' source code?

ClassCube is an online tool for Computer Science teachers that allows you to create lab assignments for your students. They'll submit their code online and ClassCube will automatically grade it for you.

Teaching with ClassCube…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>