Logic Programming - Midterm

Created
    English
  1. Other
  2. University
  3. AvatarRex Toledo
Best for asynchronous learning and homeworkAssign in student-paced mode
Best for live in-class or video conferencing lessonsStart teacher-led lesson
Preview as student

MID-TERM EXAMINATION IN LOGIC PROGRAMMING

1st Semester, AY 2023-2024

Name :

Course :

Score: __________________

Year & Section :

I. IDENTIFICATIONS (2 pts)

Directions: Identify the following statements and write the correct answer.

  1. A __________________________ is a combination of all the components required to process and store data using a computer.

  2. In a flowchart, a rectangle represents _______________________.

  3. In flowchart, the decision symbol is a _____________________.

  4. _______________________________ is a prefix that means false, and to code a program means to put it in a programming language.

  5. The two most commonly used logic-planning tools are flowcharts and _____________________.

  6. Using _______________________ involves writing down all the steps you will use in a program.

  7. A computer system that manages the creation and execution of logic programs is called a _________________________.

  8. A program with no syntax errors is translatable and can execute, but it still might contain ____________________ and produce incorrect output as a result.

  9. _____________________________ is a style of programming in which programs take the form of sets of sentences in the language of Symbolic Logic.

  10. ____________________________ is the act of developing and writing programs.

  11. ____________________________ consists of the programs that tell the computer what to do.

  12. ____________________________ comprises the programs that you use to manage your computer.

  13. The _____________________ of a computer program is the complete sequence of instructions that lead to a problem’s solution.

  14. The ________________ of a language is its grammar rules.

  15. Visual Basic, C++, and Java are all examples of computer _________________________.

II. TRUE OR FALSE

Direction: Write T if the statement is true. write false, if it's false.

  1. A program with syntax errors can execute but might produce incorrect results.

  2. A program with syntax errors cannot execute; a program with no syntax errors can execute but might produce incorrect results.

  3. Although the syntax of programming languages differs, the same program logic can be expressed in different languages.

  4. Flowcharting a program is a very different process if you use an older programming language instead of a newer one.

  5. Software is the equipment, or the devices, associated with a computer. Hardware is computer instructions.

  6. Most simple computer programs include steps that perform input, processing, and output.

  7. The grammar rules of a computer programming language are its syntax.

  8. Understanding the problem that must be solved can be one of the most difficult aspects of programming.

  9. You write programs using a programming language such as Visual Basic or Java, and a translation program (called a compiler or interpreter) converts the statements to machine language, which is 0s and 1s.

  10. You write programs using machine language, and translation software convert the statements to a programming language.

i. Google translator

h. Converter

g. Compiler

f. Logic

e. Software

d. Syntax

b. Sequence

c. Hardware

5. Language translator

4. Order of instructions

3. Language rules

1. Computer system devices

2. Another word for program

a. Grammar

19. When you draw a flowchart, you use a parallelogram to represent an input operation.

17. The two most commonly used logic-planning tools are flowcharts and algorithms.

15. Pseudocode is fairly flexible because it is a planning tool, and not the final product.

14. Programs begin with start and end with stop; these two words are always aligned.

13. Many programming languages use the term fe (for file end) to refer to a marker that automatically acts as a sentinel.

12. A program that contains an infinite loop is one that never ends.

11. A preselected value that stops the execution of a program is often called a dummy value or a sentinel value.

II. MATCHING TYPE

Direction: Match a word or words from column A to column B.

16. The term eof (for end of file) is the common term for a file sentinel.

18. When you draw a flowchart, you use a diamond to represent a processing operation.

20. When you draw a flowchart, you use a parallelogram to represent an output operation.

A.

B.

“If you believe in what you're doing, you'll be successful” - Connie Sellecca

 

***** Good Luck and God Bless *****