Learn to Program using Alice

Practice Test for the Lesson Titled

Syntax, Runtime, and Logic Errors

Published:  June 7, 2007
By Richard G. Baldwin

File: Alice0155PracticeTest.htm


Questions

1.  True or False:  There are at least three kinds of errors that you can encounter when writing computer programs:

Answer and Explanation

2.  True or False:  Syntax or format errors are a major problem for most beginning programmers using languages such as Alice, C++, Java, and C#.

Answer and Explanation

3.  True or False:  A syntax error occurs when the programmer fails to obey one of the grammar rules of the language.

Answer and Explanation

4.  True or False:  With Alice, new programming students are free to concentrate on solving the stated problem without too much worry about how to satisfy the syntax requirements.

Answer and Explanation

5.  A runtime error occurs:

Answer and Explanation

6.  True or False:  While many programming languages will produce a runtime error when an attempt is made to divide a value by zero (0), Alice will not produce a runtime error when that happens.

Answer and Explanation

7.  True or False:  Usually a program containing a logic error will run.  It simply doesn't behave as it should.  In other words, it simply doesn't produce the correct answers.

Answer and Explanation

8.  True or False:  Logic errors usually result from one or some combination of the following three causes:

Answer and Explanation

9.  True or False:  In an attempt to prevent logic errors, you should:

Answer and Explanation



Copyright 2007, Richard G. Baldwin.  Faculty and staff of public and private non-profit educational institutions are granted a license to reproduce and to use this material for purposes consistent with the teaching process.  This license does not extend to commercial ventures.  Otherwise, reproduction in whole or in part in any form or medium without express written permission from Richard Baldwin is prohibited.


The following image is the splash screen from Alice 2.0, and is the property of the developers of Alice at Carnegie Mellon.

Answers and Explanations


Answer 9

True

Explanation 9

Back to Question 9


Answer 8

True

Explanation 8

Back to Question 8


Answer 7

True

Explanation 7

Back to Question 7


Answer 6

False

Explanation 6

Back to Question 6


Answer 5

B

Explanation 5

Back to Question 5


Answer 4

True

Explanation 4

Back to Question 4


Answer 3

True

Explanation 3

Back to Question 3


Answer 2

False

Explanation 2

Back to Question 2


Answer 1

True

Explanation 1

Back to Question 1


Copyright 2007, Richard G. Baldwin.  Faculty and staff of public and private non-profit educational institutions are granted a license to reproduce and to use this material for purposes consistent with the teaching process.  This license does not extend to commercial ventures.  Otherwise, reproduction in whole or in part in any form or medium without express written permission from Richard Baldwin is prohibited.

The following image is the splash screen from Alice 2.0, and is the property of the developers of Alice at Carnegie Mellon.

-end-