0% found this document useful (0 votes)
8 views

Chapter 1 Quick

The document contains a series of multiple-choice questions related to computer programming concepts, including definitions of software, major operations, programming languages, and error types. It also includes tasks for drawing flowcharts or writing pseudocode to represent program logic for various scenarios. Overall, it serves as a quiz and practical exercise for understanding programming fundamentals.

Uploaded by

khantthawzin97
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Chapter 1 Quick

The document contains a series of multiple-choice questions related to computer programming concepts, including definitions of software, major operations, programming languages, and error types. It also includes tasks for drawing flowcharts or writing pseudocode to represent program logic for various scenarios. Overall, it serves as a quiz and practical exercise for understanding programming fundamentals.

Uploaded by

khantthawzin97
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1. Computer programs are also known as ________.

a.hardware
b. software
c. data
d. information

2. The major computer operations include ______.


a. hardware and software
b. input, processing, and output
c. sequence and looping
d. spreadsheets, word processing, and data communications

3. Visual Basic, C++, and Java are all examples of computer _____.
a. operating systems
b. hardware
c. machine languages
d. programming languages

4. A programming language’s rules are its______ .


a. syntax
b. logic
c. format
d. options

5. The most important task of a compiler or interpreter is to___ .


a. create the rules for a programming language
b. translate English statements into a language the computer can understand,
such as Java
c. translate programming language statements into machine language
d. execute machine language programs to perform useful tasks

6. Which of the following is temporary, internal storage?


a. CPU
b. hard disk
c. keyboard
d. memory
7. Which of the following pairs of steps in the programming process is in the
correct order?
a. code the program, plan the logic
b. test the program, translate it into machine language
c. put the program into production, understand the problem
d. code the program, translate it into machine language

8. The programmer’s most important task before planning the logic of a


program is to___ .
a. decide which programming language to use
b. code the problem
c. train the users of the program
d. understand the problem

9. The two most commonly used tools for planning a program’s logic are ___.
a. flowcharts and pseudocode
b. ASCII and EBCDIC
c. Java and Visual Basic
d. word processors and spreadsheets

10. Writing a program in a language such as C++ or Java is known as


the_____ program.
a. translating
b. coding
c. interpreting
d. compiling

11. An English-like programming language such as Java or Visual Basic is a


programming language.
a. machine-level
b. low-level
c. high-level
d. binary-level

12. Which of the following is an example of a syntax error?


a. producing output before accepting input
b. subtracting when you meant to add
c. misspelling a programming language word
d. all of the above

13. Which of the following is an example of a logical error?


a. performing arithmetic with a value before inputting it
b. accepting two input values when a program requires only one
c. dividing by 3 when you meant to divide by 30
d. all of the above

14. The parallelogram is the flowchart symbol representing.


a. input
b. output
c. both a and b
d. none of the above

15. In a flowchart, a rectangle represents.


a. input
b. a sentinel
c. a question
d. processing

16. In flowcharts, the decision symbol is a ___.


a. parallelogram
b. rectangle
c. lozenge
d. diamond

17. The term “eof” represents .


a. a standard input device
b. a generic sentinel value
c. a condition in which no more memory is available for storage
d. the logical flow in a program
18. When you use an IDE instead of a simple text editor to develop a program,
a. the logic is more complicated
b. the logic is simpler
c. the syntax is different
d. some help is provided

19. When you write a program that will run in a GUI environment as opposed
to a command-line environment,
a. the logic is very different
b. some syntax is different
c. you do not need to plan the logic
d. users are more confused

20. As compared to procedural programming, with object- oriented


programming .
a. the programmer’s focus differs
b. you cannot use some languages, such as Java
c. you do not accept input
d. you do not code calculations; they are created automatically
1,Draw a flowchart or write pseudocode to represent the logic of a program
that allows the user to enter a value. The program multiplies the value by
10 and outputs the result.

2. Draw a flowchart or write pseudocode to represent the logic of a program


that allows the user to enter a value for the radius of a circle. The program
calculates the diameter by multiplying the radius by 2, and then calculates
the circumference by multiplying the diameter by 3.14. The program outputs
both the diameter and the circumference.

3. Draw a flowchart or write pseudocode to represent the logic of a


program that allows the user to enter two values. The program outputs the
sum of the two values.
7. Draw a flowchart or write pseudocode to represent the logic of a
program that allows the user to enter three values. The values represent
hourly pay rate, the number of hours worked this pay period, and
percentage of gross salary that is withheld. The program multiplies the
hourly pay rate by the number of hours worked, giving the gross pay.
Then, it multiplies the gross pay by the withholding percentage, giving the
withholding amount. Finally, it subtracts the withholding amount from the
gross pay, giving the net pay after taxes. The program outputs the net pay.

You might also like