Docsity

CS 120 Computational Thinking module 1, Exams of Computer Science

Toggle sidebar
bg1
CS 120 Computational Thinking module 1
1. Which of the following best describes computational thinking?
A) Memorizing programming syntax and language rules
B) A problem-solving approach using decomposition, pattern recognition,
abstraction, and algorithm design
C) Using a calculator to perform arithmetic operations
D) Writing code without any planning or design
Correct Answer: A problem-solving approach using decomposition, pattern
recognition, abstraction, and algorithm design
Rationale: Computational thinking is a systematic problem-solving process rooted in
computer science principles. It involves formulating problems so their solutions can
be represented as computational steps or algorithms. It is not merely memorizing
syntax or using tools without thought.
2. What is the primary purpose of decomposition in computational thinking?
A) To increase the overall execution time of a program
B) To break a complex problem into smaller, more manageable parts
C) To hide the problem's complexity from users
D) To avoid using any algorithms in the solution
Correct Answer: To break a complex problem into smaller, more manageable parts
Rationale: Decomposition simplifies a large or difficult problem by dividing it into
smaller, independent pieces that can be solved and verified separately. This makes
the overall problem more manageable and easier to test. It does not increase
execution time or hide complexity.
3. According to the module, which term refers to identifying similarities and
repeated structures that can help solve a problem?
A) Decomposition
B) Pattern recognition
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29

Partial preview of the text

Download CS 120 Computational Thinking module 1 and more Exams Computer Science in PDF only on Docsity!

CS 120 Computational Thinking module 1

  1. Which of the following best describes computational thinking? A) Memorizing programming syntax and language rules B) A problem-solving approach using decomposition, pattern recognition, abstraction, and algorithm design C) Using a calculator to perform arithmetic operations D) Writing code without any planning or design Correct Answer: A problem-solving approach using decomposition, pattern recognition, abstraction, and algorithm design Rationale: Computational thinking is a systematic problem-solving process rooted in computer science principles. It involves formulating problems so their solutions can be represented as computational steps or algorithms. It is not merely memorizing syntax or using tools without thought.
  2. What is the primary purpose of decomposition in computational thinking? A) To increase the overall execution time of a program B) To break a complex problem into smaller, more manageable parts C) To hide the problem's complexity from users D) To avoid using any algorithms in the solution Correct Answer: To break a complex problem into smaller, more manageable parts Rationale: Decomposition simplifies a large or difficult problem by dividing it into smaller, independent pieces that can be solved and verified separately. This makes the overall problem more manageable and easier to test. It does not increase execution time or hide complexity.
  3. According to the module, which term refers to identifying similarities and repeated structures that can help solve a problem? A) Decomposition B) Pattern recognition

C) Abstraction D) Algorithm design Correct Answer: Pattern recognition Rationale: Pattern recognition involves identifying similarities, trends, and repeated structures across data or problems. This helps in grouping similar cases, predicting outcomes, and reusing solutions. Decomposition breaks problems down, abstraction filters details, and algorithm design creates step-by-step solutions.

  1. What is the primary function of abstraction in computational thinking? A) Breaking a problem into smaller sub-problems B) Focusing on essential details while ignoring irrelevant ones C) Creating a step-by-step sequence of instructions D) Identifying repeated patterns in data Correct Answer: Focusing on essential details while ignoring irrelevant ones Rationale: Abstraction represents a problem by its essential features while hiding unnecessary details, reducing complexity. It allows problem solvers to focus on what matters most. Decomposition breaks problems apart, pattern recognition finds similarities, and algorithm design creates procedures.
  2. Which of the following best describes algorithm design? A) Ignoring details to simplify a problem B) Breaking a problem into smaller parts C) Creating a clear, ordered sequence of steps to solve a problem D) Finding similarities among different problems Correct Answer: Creating a clear, ordered sequence of steps to solve a problem
  1. What is the most likely benefit of using computational thinking in problem- solving? A) It guarantees that the first solution attempted will always work B) It provides a systematic approach that improves efficiency and reduces errors C) It eliminates the need for testing and verification D) It allows problems to be solved without any planning Correct Answer: It provides a systematic approach that improves efficiency and reduces errors Rationale: Computational thinking offers a structured, systematic approach to problem-solving that helps break down complexity, identify patterns, and design effective solutions. This improves efficiency and reduces errors. It does not guarantee first-attempt success, eliminate testing, or remove the need for planning.
  2. Which of the following best distinguishes human thinking from computational thinking? A) Humans can only solve problems sequentially, while computers can multitask B) Computational thinking is more emotional and intuitive than human thinking C) Humans can create original thought, while computers cannot D) Computational thinking does not involve logic or reasoning Correct Answer: Humans can create original thought, while computers cannot Rationale: One key distinction is that humans can create original thought, while computers cannot. Computers process information according to instructions. Computational thinking is logical and systematic, not emotional. Humans can also multitask, and computational thinking heavily involves logic and reasoning.
  3. According to the module, which of the following is NOT one of the four pillars of computational thinking? A) Decomposition B) Pattern recognition

C) Compilation D) Algorithm design Correct Answer: Compilation Rationale: The four pillars of computational thinking are decomposition, pattern recognition, abstraction, and algorithm design. Compilation is a process in software development that translates source code into machine code, not a pillar of computational thinking.

  1. What is the primary role of pattern recognition in solving problems? A) To break a problem into smaller parts B) To identify similarities and trends that can guide solutions C) To remove all unnecessary details from a problem D) To write the final code for a program Correct Answer: To identify similarities and trends that can guide solutions Rationale: Pattern recognition helps problem solvers identify similarities, trends, and repeated structures across data or problems. This allows for grouping similar cases, predicting outcomes, and reusing solutions. Breaking problems apart is decomposition, removing details is abstraction, and writing code is implementation.
  2. Which term refers to a rule-of-thumb or approximate problem-solving method used when finding the perfect solution would take too long? A) Algorithm B) Heuristic C) Decomposition D) Abstraction Correct Answer: Heuristic
  1. Which of the following is an example of pattern recognition in computational thinking? A) Writing a loop that counts from 1 to 10 B) Noticing that every time a list is sorted, the smallest element moves to the first position C) Defining a variable type for a user's age D) Choosing a programming language for a project Correct Answer: Noticing that every time a list is sorted, the smallest element moves to the first position Rationale: Pattern recognition involves identifying regularities or repeated structures. Noticing that the smallest element ends up first after sorting is identifying a pattern in the sorting process. Writing a loop is algorithm design, defining a variable is programming, and choosing a language is a development decision.
  2. What is the primary purpose of the UPDCA framework in computational thinking? A) To provide a structured problem-solving process: Understand, Plan, Do, Check, Adjust B) To describe the four pillars of computational thinking C) To list the steps of the software development lifecycle D) To define the components of a computer system Correct Answer: To provide a structured problem-solving process: Understand, Plan, Do, Check, Adjust Rationale: The UPDCA framework (Understand, Plan, Do, Check, Adjust) provides a structured problem-solving process that ties together the elements of computational thinking. It is not the four pillars, the software development lifecycle, or a computer system definition.
  3. Which of the following best describes the relationship between computational thinking and computer science?

A) Computational thinking is a subset of computer science focused only on programming B) Computer science is a subset of computational thinking focused only on hardware C) Computational thinking is a problem-solving approach that draws on concepts from computer science D) They are completely unrelated fields of study Correct Answer: Computational thinking is a problem-solving approach that draws on concepts from computer science Rationale: Computational thinking is a problem-solving approach that uses ideas from computer science, such as decomposition, abstraction, and algorithms, to solve problems in various domains. It is not limited to programming or hardware, and the two fields are related but not identical.

  1. What is the most likely benefit of learning computational thinking skills for students in non-computer science fields? A) They will become expert programmers immediately B) They can apply systematic problem-solving approaches to their own disciplines C) They will no longer need to use computers for their work D) They can avoid learning any technical skills Correct Answer: They can apply systematic problem-solving approaches to their own disciplines Rationale: Computational thinking skills are transferable across domains. Students in fields like science, business, or humanities can apply decomposition, pattern recognition, abstraction, and algorithm design to solve problems in their own disciplines. It does not make them expert programmers immediately or eliminate the need for technical skills.
  2. Which of the following is an example of using abstraction in everyday life? A) Following a recipe step by step

Rationale: An algorithm is a finite, well-defined sequence of steps that solves a problem. It must have clear inputs and outputs, be definite, finite, and effective. It is not infinite, random, or merely a visual representation.

  1. Which of the following is a property of a good algorithm? A) Definiteness B) Ambiguity C) Infiniteness D) Randomness Correct Answer: Definiteness Rationale: A good algorithm must have definiteness, meaning each step is precisely defined and unambiguous. Other key properties include input, output, finiteness, and effectiveness. Ambiguity, infiniteness, and randomness are not properties of a good algorithm.
  2. According to the module, which term refers to the data supplied to a program, system, or algorithm? A) Output B) Input C) Process D) Storage Correct Answer: Input Rationale: Input refers to the data supplied to a program, system, or algorithm, such as through a keyboard, sensor, or file. Output is the data produced, process is the transformation, and storage is where data is kept.
  3. What is the most likely outcome if an algorithm lacks finiteness? A) The algorithm will always produce the correct result

B) The algorithm may never terminate, causing an infinite loop C) The algorithm will be easier to understand D) The algorithm will require less memory Correct Answer: The algorithm may never terminate, causing an infinite loop Rationale: Finiteness is a key property of algorithms, meaning they must terminate after a finite number of steps. If an algorithm lacks finiteness, it may run indefinitely, causing an infinite loop and never producing a result. It does not ensure correctness or improve understanding.

  1. Which of the following best describes pseudocode? A) A precise programming language that computers can execute directly B) A structured, code-like language used to describe algorithms C) A visual representation of a program using symbols D) A type of computer hardware Correct Answer: A structured, code-like language used to describe algorithms Rationale: Pseudocode is a structured, informal language that resembles programming code but is not executable by computers. It is used to describe algorithms in a human-readable way. It is not a programming language, a flowchart, or hardware.
  2. What is the primary purpose of a flowchart? A) To provide a pictorial representation of an algorithm B) To execute a program automatically C) To store data permanently D) To translate source code into machine code Correct Answer: To provide a pictorial representation of an algorithm

B) A painting hanging on a wall C) A random collection of numbers D) A computer's hard drive Correct Answer: A recipe for baking a cake Rationale: A recipe is a finite, well-defined sequence of steps for achieving a specific outcome (baking a cake), making it an everyday example of an algorithm. A painting, random numbers, and a hard drive are not algorithms.

  1. In the context of algorithms, what does effectiveness mean? A) The algorithm produces the correct result but takes a long time B) Each step of the algorithm is basic enough to be carried out exactly C) The algorithm uses the most advanced programming language D) The algorithm is written in the fewest lines of code possible Correct Answer: Each step of the algorithm is basic enough to be carried out exactly Rationale: Effectiveness means that each step of an algorithm is basic enough to be carried out exactly and in a finite amount of time. It is not about speed, language choice, or code length.
  2. What is the most likely purpose of using pseudocode before writing actual code? A) To test the program's performance on different hardware B) To plan and communicate the algorithm without worrying about syntax C) To automatically generate the final program D) To encrypt the program's source code Correct Answer: To plan and communicate the algorithm without worrying about syntax

Rationale: Pseudocode allows programmers to focus on the logic and structure of an algorithm without being concerned with the specific syntax of a programming language. It is a planning and communication tool. It does not test performance, generate code automatically, or encrypt code.

  1. Which of the following best describes a flowchart symbol for a decision? A) A rectangle B) A diamond C) A parallelogram D) An oval Correct Answer: A diamond Rationale: In flowcharts, a diamond shape represents a decision or branching point, where the flow can go in different directions based on a condition. Rectangles represent processes, parallelograms represent input/output, and ovals represent start/end points.
  2. What is the primary purpose of a compiler in the context of algorithms and programming? A) To execute a program line by line B) To translate high-level code into machine-readable instructions C) To store data permanently D) To connect a computer to a network Correct Answer: To translate high-level code into machine-readable instructions Rationale: A compiler is a language translator that converts high-level programming code into machine-readable instructions that a computer can execute. It does not execute code line by line (that is an interpreter), store data, or handle networking.
  3. Which of the following is a characteristic of system software? A) It is designed to help users perform specific tasks like writing documents

Rationale: A device driver is system software that enables communication between the operating system and hardware devices like printers, graphics cards, or network adapters. Spreadsheet, browser, and photo editing programs are application software.

  1. What is the primary purpose of a utility program? A) To provide tools for system maintenance such as disk cleanup and antivirus scanning B) To create and edit documents C) To manage network communications D) To design websites Correct Answer: To provide tools for system maintenance such as disk cleanup and antivirus scanning Rationale: Utility programs are system software designed for system maintenance tasks like disk cleanup, defragmentation, and antivirus scanning. Document creation, network management, and web design are handled by other types of software.
  2. Which of the following best describes the Von Neumann architecture? A) A model of computation where data and instructions are stored in the same memory B) A model of computation that uses only hardware without software C) A model of computation that does not use a CPU D) A model of computation that uses only quantum bits Correct Answer: A model of computation where data and instructions are stored in the same memory Rationale: The Von Neumann architecture is a foundational computer design where both data and instructions are stored in the same memory. It includes a CPU,

memory, input/output, and bus systems. It does use a CPU and is not limited to quantum computing.

  1. What is the primary function of the CPU in a computer system? A) To store data permanently B) To execute instructions and perform calculations C) To display output to the user D) To connect to the internet Correct Answer: To execute instructions and perform calculations Rationale: The CPU (Central Processing Unit) executes instructions and performs calculations. It is the brain of the computer. Permanent data storage is handled by storage devices, output display by monitors, and internet connectivity by network components.
  2. Which of the following is an example of an input device? A) Monitor B) Printer C) Keyboard D) Speaker Correct Answer: Keyboard Rationale: A keyboard is an input device used to enter data and instructions into a computer. Monitors, printers, and speakers are output devices that present information to the user.
  3. What is the primary function of RAM in a computer? A) To store data permanently B) To hold data and instructions currently in use by the CPU C) To display images on the screen

automatically increased, and the computer does not typically shut down immediately.

  1. Which of the following best describes the purpose of a bus in a computer system? A) To store data permanently B) To transfer data between components C) To display output to the user D) To provide power to the computer Correct Answer: To transfer data between components Rationale: A bus is a communication system that transfers data between components of a computer, such as the CPU, memory, and input/output devices. It does not store data, display output, or provide power.
  2. What is the primary function of an output device? A) To accept data from the user B) To process data into information C) To present processed data to the user D) To store data permanently Correct Answer: To present processed data to the user Rationale: Output devices, such as monitors, printers, and speakers, present processed data to the user. Input devices accept data, the CPU processes data, and storage devices retain data permanently.
  3. Which of the following is an example of application software? A) Microsoft Windows B) Linux C) Microsoft Excel

D) BIOS

Correct Answer: Microsoft Excel Rationale: Microsoft Excel is application software designed for spreadsheet tasks. Windows and Linux are operating systems (system software), and BIOS is firmware that initializes hardware during startup.

  1. What is the primary purpose of a spreadsheet program? A) To create and format text documents B) To organize, analyze, and calculate numerical data C) To manage large databases D) To design and edit graphics Correct Answer: To organize, analyze, and calculate numerical data Rationale: Spreadsheet software, such as Microsoft Excel, is designed for managing and analyzing numerical data through rows, columns, formulas, and charts. Word processing handles text documents, database software manages data, and graphics software handles visual design.
  2. Which of the following is a key characteristic of a relational database? A) Data is stored in a single large file without structure B) Data is organized into tables with rows and columns C) Data can only be accessed by a single user D) Data is stored only in RAM Correct Answer: Data is organized into tables with rows and columns Rationale: Relational databases organize data into tables (relations) with rows (records) and columns (fields), allowing for efficient querying and relationships between tables. They support multiple users and store data on disk.