0% found this document useful (0 votes)
52 views2 pages

Pre-Lab 2: COSC1336

This document provides instructions for a pre-lab assignment requiring students to answer 22 multiple choice questions from their textbook. The questions cover topics like: [1] logic errors vs incorrect results, [2] software requirements, [3] algorithms, [4] pseudocode, [5] flowcharts, [6] strings, [7] variables, [8] users, [9] string literals, [10] comments, [11] assignments, [12] comment syntax, and data types. Students are instructed to include the letter answer in their submission.

Uploaded by

Magdalen Hobbs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views2 pages

Pre-Lab 2: COSC1336

This document provides instructions for a pre-lab assignment requiring students to answer 22 multiple choice questions from their textbook. The questions cover topics like: [1] logic errors vs incorrect results, [2] software requirements, [3] algorithms, [4] pseudocode, [5] flowcharts, [6] strings, [7] variables, [8] users, [9] string literals, [10] comments, [11] assignments, [12] comment syntax, and data types. Students are instructed to include the letter answer in their submission.

Uploaded by

Magdalen Hobbs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

COSC1336

Pre-Lab 2
Prior to working on Lab 2, answer multiple choice questions 1 through 22 on pages 100 -102 of
your text. Be sure and include the LETTER answer in your submission.
1. A __________ error does not prevent the program from running, but causes it to produce
incorrect results.
c. logic

2. A __________ is a single function that the program must perform in order to satisfy the
customer.
b. software requirement

3. A(n) __________ is a set of well-defined logical steps that must be taken to perform a
task.
d. algorithm
4. An informal language that has no syntax rules, and is not meant to be compiled or
executed is called __________.
b. pseudocode
4. A __________ is a diagram that graphically depicts the steps that take place in a
program.
a. flowchart
6. A __________ is a sequence of characters.
c. string

7. A __________ is a name that references a value in the computer’s memory.


a. variable

8. A __________ is any hypothetical person using a program and providing input for it.
b. user

9. A string literal in Python must be enclosed in


d. either single-quotes or double-quotes

10. Short notes placed in different parts of a program explaining how those parts of the
program work are called __________.
a. comments

11. A(n) __________ makes a variable reference a value in the computer’s memory.
b. assignment statement
COSC1336

12. This symbol marks the beginning of a comment in Python.


d. #

13. Which of the following statements will cause an error?


b. 17 = x

14. In the expression 12 + 7, the values on the right and left of the + symbol are called
a. operands

15. This operator performs integer division.


a. //

16. This is an operator that raises a number to a power.


c. **

17. This operator performs division, but instead of returning the quotient it returns the
remainder.
a. %

18. Suppose the following statement is in a program: price = 99.0. After this statement
executes, the price variable will reference a value of this data type.
b. float

19. This built-in function can be used to read input that has been typed on the keyboard.
a. input()

20. This built-in function can be used to convert an int value to a float.
b. float()

You might also like