Introduction to Programming
- 47Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What most fundamentally distinguishes a computer from a traditional single-purpose machine?
What most fundamentally distinguishes a computer from a traditional single-purpose machine?
47 questions
- 1
What most fundamentally distinguishes a computer from a traditional single-purpose machine?
- A
A computer can receive different instructions and perform many types of tasks
- B
A computer performs only the task specified when its physical parts are built
- C
A computer operates without using electrical signals or stored information
- D
A computer always performs mechanical tasks more quickly than other machines
Correct answer
AA computer can receive different instructions and perform many types of tasks
Explanation
Traditional machines are generally designed for one primary task, whereas computers can perform many different tasks when given different sets of instructions.
- A
- 2
Why might a computer be placed inside a modern sewing machine or automobile even if the device has one main purpose?
- A
Computers ensure that the device can perform every possible human activity
- B
Using a computer may be simpler than building a specialized electronic or electromechanical control system
- C
Computers eliminate the need for any physical components in the device
- D
Using a computer prevents the device from needing any instructions
Correct answer
BUsing a computer may be simpler than building a specialized electronic or electromechanical control system
Explanation
A computer can control a device through instructions, which may be simpler than designing a complicated custom circuit or mechanical control system.
- A
- 3
Which example best illustrates a computer performing multiple tasks through different instructions?
- A
A mechanical clock moves its hands at a regular rate
- B
A sewing machine moves its needle according to fixed settings
- C
A laptop browses the web and then streams a video
- D
A car engine repeatedly moves its pistons in the same way
Correct answer
CA laptop browses the web and then streams a video
Explanation
A laptop can browse the web, stream video, run applications, and perform many other tasks because its behavior can be changed through software instructions.
- A
- 4
What gives a smartphone new functionality after the phone has been manufactured?
- A
Installing applications that provide additional instructions and capabilities
- B
Increasing the number of mechanical parts inside the phone
- C
Replacing the phone's physical screen with a larger display
- D
Changing the electrical signals into permanently fixed settings
Correct answer
AInstalling applications that provide additional instructions and capabilities
Explanation
Installing apps gives a smartphone new functionality because each app contains instructions that enable the computer to perform additional tasks.
- A
- 5
Which statement best defines programming?
- A
Programming is the replacement of an operating system with mechanical controls
- B
Programming is the creation of instructions that enable a computer to perform a task
- C
Programming is the physical construction of a computer's electronic components
- D
Programming is the process of operating a computer without giving it instructions
Correct answer
BProgramming is the creation of instructions that enable a computer to perform a task
Explanation
Programming is the act of creating instructions that a computer can follow to accomplish a task or gain new functionality.
- A
- 6
Which statement correctly describes a program?
- A
A program is a set of instructions that a computer can follow
- B
A program is exclusively the physical memory installed in a computer
- C
A program is a machine that performs one task without stored instructions
- D
A program is only the screen through which a user views information
Correct answer
AA program is a set of instructions that a computer can follow
Explanation
A program is a set of instructions that a computer can run to complete a task. Programs are also broadly called software.
- A
- 7
Which item is an example of a program or software?
- A
A keyboard key without any associated instructions
- B
A computer's external monitor by itself
- C
A web browser such as Firefox or Chrome
- D
A physical sewing needle without electronic controls
Correct answer
CA web browser such as Firefox or Chrome
Explanation
Web browsers, mobile apps, file-management tools, video games, and operating systems are all examples of programs or software.
- A
- 8
How can a program support user interaction on a website?
- A
It can allow users to interact only by physically modifying the computer's hardware
- B
It can prevent the browser from recognizing typed text or clicked buttons
- C
It can process typed information and button selections and pass submitted data to a server
- D
It can replace all network communication with a fixed image on the screen
Correct answer
CIt can process typed information and button selections and pass submitted data to a server
Explanation
When a user fills out a form or clicks buttons, the browser processes those interactions and can send the submitted information to a web server.
- A
- 9
What is the role of an operating system such as Windows, iOS, or Android?
- A
It is a binary digit that represents one electrical signal
- B
It is a physical circuit that replaces every application on the computer
- C
It is a single-purpose program used only to stream video
- D
It is software containing instructions that help users interact with and use the computer
Correct answer
DIt is software containing instructions that help users interact with and use the computer
Explanation
An operating system is software: a set of instructions that manages computer operation and allows users to interact with the computer.
- A
- 10
What do computers fundamentally use to represent information through electrical signals?
- A
Natural-language sentences stored without any numerical representation
- B
Mechanical movements that cannot be represented electronically
- C
Binary states corresponding to signals that are on or off
- D
Only decimal numbers entered directly by a programmer
Correct answer
CBinary states corresponding to signals that are on or off
Explanation
Computers use electrical signals in on or off states. These states represent binary digits, which can be assembled into binary numbers and meaningful information.
- A
- 11
Why did early computer programming require working directly with binary?
- A
Computers directly interpret the binary instructions represented by their electrical states
- B
Binary automatically explains the purpose of every instruction to the programmer
- C
Computers cannot execute instructions that contain any numerical values
- D
Binary is more similar to ordinary human conversation than other languages
Correct answer
AComputers directly interpret the binary instructions represented by their electrical states
Explanation
Computers fundamentally operate on binary instructions, so early programmers had to write instructions in a form the computer could directly understand.
- A
- 12
What was the main purpose of assembly languages?
- A
They provided more human-readable instructions that could be translated into binary
- B
They replaced all computer programs with natural-language conversations
- C
They converted binary instructions into mechanical movements without software
- D
They allowed computers to operate without any electrical signals
Correct answer
AThey provided more human-readable instructions that could be translated into binary
Explanation
Assembly languages use somewhat more human-readable text than raw binary, and that text can be translated directly into binary instructions.
- A
- 13
What is one advantage of programming directly at the binary or assembly level?
- A
The programmer can create complex interfaces without writing detailed instructions
- B
The programmer automatically avoids all errors caused by low-level code
- C
The programmer never needs reference materials or knowledge of the machine
- D
The programmer has precise control over individual computer instructions and optimization
Correct answer
DThe programmer has precise control over individual computer instructions and optimization
Explanation
Low-level programming gives detailed control over what the computer does, allowing programmers to optimize execution for specific needs.
- A
- 14
Why is writing programs directly in binary generally difficult?
- A
Even simple features require many detailed instructions, making code difficult to write and debug
- B
Binary cannot control displays, input devices, or other computer components
- C
Binary instructions are automatically translated into unrelated programming languages
- D
Binary prevents programmers from specifying the exact actions of the computer
Correct answer
AEven simple features require many detailed instructions, making code difficult to write and debug
Explanation
Creating features such as clickable buttons or displayed images in binary requires many low-level instructions. The volume and complexity make programming time-consuming and mistakes difficult to find.
- A
- 15
Why might assembly still be used in some modern situations?
- A
It eliminates the need to translate instructions into a form the computer understands
- B
It is always easier for beginners than a high-level programming language
- C
It is the only language that can create programs with user interaction
- D
It can provide highly specific optimization or control for particular problems
Correct answer
DIt can provide highly specific optimization or control for particular problems
Explanation
Although most programming is done with higher-level languages, assembly can still be useful when precise optimization or machine-level control is required.
- A
- 16
What is the primary purpose of a programming language?
- A
It helps programmers write human-readable instructions that can be translated into binary
- B
It replaces the computer's hardware with a collection of written explanations
- C
It ensures that every program consists of only one binary digit
- D
It allows a computer to perform tasks without executing any instructions
Correct answer
AIt helps programmers write human-readable instructions that can be translated into binary
Explanation
Programming languages use familiar words and structures to make instructions easier for humans to write and remember, then translate those instructions into binary.
- A
- 17
How do programming languages reduce the amount of code a programmer must write?
- A
One convenient command can represent many lower-level binary instructions
- B
They allow programmers to omit all instructions related to program behavior
- C
They remove the need for the computer to perform any calculations
- D
They store every command as a physical component rather than software
Correct answer
AOne convenient command can represent many lower-level binary instructions
Explanation
A programming-language command can consolidate many binary instructions, allowing programmers to express complex operations more simply.
- A
- 18
Which list contains only programming languages mentioned in the content?
- A
C, C++, Java, JavaScript, and Python
- B
Compiler, interpreter, browser, and operating system
- C
Keyboard, monitor, mouse, and smartphone
- D
Windows, Android, Firefox, and Canvas
Correct answer
AC, C++, Java, JavaScript, and Python
Explanation
C, C++, Java, JavaScript, and Python are programming languages. Windows and Android are operating systems, while Firefox and Canvas are programs or applications.
- A
- 19
What does a compiler generally do?
- A
It tests user satisfaction without running the program
- B
It translates written source code into an executable program before execution
- C
It displays a graphical interface without translating or executing code
- D
It manually types binary instructions on behalf of the computer user
Correct answer
BIt translates written source code into an executable program before execution
Explanation
A compiler translates source code into an executable program that can later be run. Visual Basic was described as using this kind of process.
- A
- 20
What distinguishes an interpreter from a compiler?
- A
An interpreter reads code during execution and performs it without compiling everything ahead of time
- B
An interpreter tests users while a compiler collects user requirements
- C
An interpreter can translate only binary while a compiler can translate only English
- D
An interpreter creates physical hardware while a compiler creates software
Correct answer
AAn interpreter reads code during execution and performs it without compiling everything ahead of time
Explanation
An interpreter reads and executes code live, whereas a compiler generally translates the code into an executable form before it is run.
- A
- 21
What is a programming language paradigm?
- A
A file format used exclusively for storing binary digits
- B
A style or way of thinking about programming that can make certain tasks easier
- C
A physical device that converts electrical signals into monitor images
- D
A required sequence for installing applications on a smartphone
Correct answer
BA style or way of thinking about programming that can make certain tasks easier
Explanation
A paradigm is a programming style or conceptual approach that organizes how programmers think about and solve problems.
- A
- 22
What is the central idea of object-oriented programming?
- A
A program is organized around objects that contain properties, perform actions, and interact
- B
A program avoids interactions between its components by using fixed settings
- C
A program can contain only graphical objects that users can see on a monitor
- D
A program must be written as one uninterrupted list of binary instructions
Correct answer
AA program is organized around objects that contain properties, perform actions, and interact
Explanation
Object-oriented programming treats program components as objects that have properties, can perform functions, and can interact with other objects.
- A
- 23
How does object-oriented programming differ from a strictly step-by-step approach?
- A
It emphasizes interactions among objects rather than only listing sequential steps
- B
It requires every object to perform the same action in the same order
- C
It eliminates the need to define what any program component can do
- D
It represents all program behavior as raw electrical signals written manually
Correct answer
AIt emphasizes interactions among objects rather than only listing sequential steps
Explanation
Instead of focusing only on instructions such as “step one” and “step two,” object-oriented programming focuses on objects and how they communicate or interact.
- A
- 24
Which statement best describes an object in object-oriented programming?
- A
It is exclusively a physical item that can be touched outside the computer
- B
It is a programming language that translates source code into binary
- C
It is a testing process used to determine whether users like an application
- D
It is something within a program that can be represented, used, have properties, or perform actions
Correct answer
DIt is something within a program that can be represented, used, have properties, or perform actions
Explanation
Objects are program entities that can be seen, conceptually touched, or used within the program. They have properties, may perform functions, and can interact with other objects.
- A
- 25
Which relationship best illustrates object interaction in a graphical application?
- A
An application object prevents every button from having properties or actions
- B
A button translates all source code into binary without interacting with the application
- C
A button permanently replaces the application object whenever a user clicks it
- D
An application object positions a button, and the button signals the application when clicked
Correct answer
DAn application object positions a button, and the button signals the application when clicked
Explanation
The example describes an application object interacting with button objects: the application can position a button, and the button can notify the application when clicked.
- A
- 26
What is a class in object-oriented programming?
- A
A pattern or blueprint used to create objects
- B
A binary instruction executed by the processor
- C
A single object created from an existing pattern
- D
A graphical device used to display program output
Correct answer
AA pattern or blueprint used to create objects
Explanation
A class defines the pattern for objects, including their properties, capabilities, and permitted interactions.
- A
- 27
What can a class definition specify about the objects created from it?
- A
Only the binary digits used to store their names in memory
- B
Their properties, available actions, and how other objects may interact with them
- C
Only the color of their graphical representation on the computer screen
- D
The physical construction of the computer that will run the objects
Correct answer
BTheir properties, available actions, and how other objects may interact with them
Explanation
A class can define what its objects have, what they can do, and which procedures outside entities are allowed to request or access.
- A
- 28
What is an instance of a class?
- A
A particular object created from that class's pattern
- B
A property that every unrelated object must share
- C
A compiler that translates the class into an operating system
- D
A general pattern from which many classes are created
Correct answer
AA particular object created from that class's pattern
Explanation
An object created from a class is an instance of that class. A class may be used to create many individual instances.
- A
- 29
What does it mean to instantiate an object?
- A
It means testing a program without creating any program objects
- B
It means creating an object from the definition or pattern of a class
- C
It means deleting every object that belongs to a class
- D
It means translating a program directly into natural-language instructions
Correct answer
BIt means creating an object from the definition or pattern of a class
Explanation
Instantiation is the process of asking the programming environment to create a particular object using a class as its pattern.
- A
- 30
If a teacher class defines a name and a list of courses, what would each teacher object receive?
- A
A fixed list of every course taught by every teacher
- B
A binary representation but no properties or behaviors
- C
Only the class definition, without any individual properties
- D
Its own name and its own list of courses based on the class definition
Correct answer
DIts own name and its own list of courses based on the class definition
Explanation
Each object created from the teacher class inherits the properties defined by the class, while holding values specific to that individual teacher.
- A
- 31
What does the example of a class object holding a teacher and assignments demonstrate?
- A
Objects can contain references to other objects and interact through those relationships
- B
Only graphical user interfaces can be represented as objects
- C
Objects must remain completely independent and cannot refer to one another
- D
A class and an object are always identical and cannot have different roles
Correct answer
AObjects can contain references to other objects and interact through those relationships
Explanation
The example shows a course object holding a teacher, students, and assignments, while those objects can also relate back to the course. This illustrates interacting object relationships.
- A
- 32
What is an integrated development environment, or IDE?
- A
A program that combines tools for creating, running, testing, and building programs
- B
A programming language designed solely for writing assembly instructions
- C
A hardware component that stores only the binary form of an operating system
- D
A user-interface device that replaces the computer's keyboard and monitor
Correct answer
AA program that combines tools for creating, running, testing, and building programs
Explanation
An IDE brings program writing, execution, testing, and application building into one software environment.
- A
- 33
How did development commonly work before integrated development environments became available?
- A
Programmers avoided testing because text editors automatically detected every problem
- B
Programmers used a basic text editor and manually ran separate execution and testing tools
- C
Programmers used operating systems that automatically converted requirements into finished applications
- D
Programmers wrote programs only by clicking graphical buttons in a unified environment
Correct answer
BProgrammers used a basic text editor and manually ran separate execution and testing tools
Explanation
Before IDEs, programmers often wrote code in simple text editors and separately invoked compilers, interpreters, and testing programs.
- A
- 34
What is the function of a graphical user interface, or GUI?
- A
It replaces the program's instructions with physical movements of the monitor
- B
It translates all source code into binary without allowing user interaction
- C
It lets users see and interact with a program through visual elements and input devices
- D
It provides only a text-based terminal with no images or clickable controls
Correct answer
CIt lets users see and interact with a program through visual elements and input devices
Explanation
A GUI uses visual elements on a display and devices such as a mouse, keyboard, or touchscreen to let users interact with a program.
- A
- 35
Which example represents GUI interaction on a smartphone?
- A
Typing binary digits directly into the phone's processor
- B
Tapping visual controls to launch or use an application
- C
Running a program without viewing or interacting with any interface
- D
Replacing the phone's operating system with a mechanical switch
Correct answer
BTapping visual controls to launch or use an application
Explanation
A smartphone GUI provides visible controls that users can tap to run and interact with applications.
- A
- 36
How does a GUI relate to the program that provides it?
- A
The GUI exists only before the program is written and disappears during execution
- B
The GUI is the binary processor that executes every program instruction
- C
The GUI is a component of the program created through program instructions
- D
The GUI is always a separate physical device unrelated to the program
Correct answer
CThe GUI is a component of the program created through program instructions
Explanation
A program includes instructions that create its graphical interface, making the GUI a component of the running program.
- A
- 37
What usually distinguishes an application from a program in the terminology used here?
- A
An application is typically a program with a graphical user interface
- B
An application is a binary instruction that cannot display visual elements
- C
An application is always a smaller program with no user interaction
- D
An application is a physical computer that runs several operating systems
Correct answer
AAn application is typically a program with a graphical user interface
Explanation
The content uses “application” typically for a program with a GUI, such as software containing icons, images, and clickable controls.
- A
- 38
What is the primary workplace responsibility of a programmer?
- A
To define a company's problems without creating or testing any software
- B
To manufacture the physical components required by every computer system
- C
To operate computers only through applications created by other people
- D
To develop computer-based solutions to problems faced by a company or its users
Correct answer
DTo develop computer-based solutions to problems faced by a company or its users
Explanation
A programmer creates computer solutions that may become part of a company's workflow, information system, or software product.
- A
- 39
What makes a programming solution general rather than specific?
- A
It solves one example perfectly while ignoring other possible inputs
- B
It addresses all relevant cases of a problem instead of only one set of values or one person
- C
It focuses on the programmer's preferred case rather than the users' needs
- D
It uses fixed values so that users cannot provide different information
Correct answer
BIt addresses all relevant cases of a problem instead of only one set of values or one person
Explanation
Programmers aim to solve a class of problems across possible numerical values, people, and circumstances, rather than handling only one specific example.
- A
- 40
What should programmers do first in the described programming workflow?
- A
Write code immediately without consulting potential users
- B
Meet with the people who will use the program and understand their needs
- C
Test a finished interface before deciding what the program should do
- D
Deliver a final application before identifying the problem
Correct answer
BMeet with the people who will use the program and understand their needs
Explanation
The workflow begins by meeting with users to understand the problem, missing functionality, and requirements for the proposed solution.
- A
- 41
Why should a programmer plan a solution before writing code?
- A
Planning clarifies the program's tasks and how each task should be solved
- B
Planning guarantees that the program will never need testing or revision
- C
Planning replaces the need to translate code into executable instructions
- D
Planning allows the programmer to avoid understanding the users' problem
Correct answer
APlanning clarifies the program's tasks and how each task should be solved
Explanation
Planning helps programmers identify what the program must do and determine how to address each task before implementation begins.
- A
- 42
What does the term “cowboy coding” describe?
- A
Writing highly optimized instructions in assembly language
- B
Designing a GUI by arranging visual controls on a form
- C
Testing a program repeatedly with users after each development iteration
- D
Starting to write code without first planning how the solution should work
Correct answer
DStarting to write code without first planning how the solution should work
Explanation
Cowboy coding refers to jumping into coding without a deliberate plan, which can make it easy to lose direction.
- A
- 43
Which sequence best represents the main programming workflow described?
- A
Code immediately, deliver, identify users, plan, and test only if problems appear
- B
Build hardware, install an operating system, avoid testing, and release the program
- C
Understand users and the problem, plan, code, test, revise if needed, and deliver
- D
Test first, write requirements later, code, and deliver without user feedback
Correct answer
CUnderstand users and the problem, plan, code, test, revise if needed, and deliver
Explanation
The described workflow involves consulting users, understanding the problem, planning a solution, coding, testing, repeating when appropriate, and delivering the final product.
- A
- 44
What is the main purpose of alpha testing?
- A
To verify internally that the program works correctly and does not crash
- B
To determine whether external users like the program's solution
- C
To translate the program from a human-readable language into binary
- D
To identify which company should purchase the finished program
Correct answer
ATo verify internally that the program works correctly and does not crash
Explanation
Alpha testing focuses on internal correctness, such as ensuring that the program was written properly and does not crash.
- A
- 45
What is the main purpose of beta testing?
- A
To determine whether users find the program useful and whether it solves their needs
- B
To verify only that the compiler can produce an executable file
- C
To ensure that programmers can write every instruction in binary
- D
To define the properties of objects before any program is created
Correct answer
ATo determine whether users find the program useful and whether it solves their needs
Explanation
Beta testing involves users and evaluates whether the program is useful, acceptable, and actually addresses the problems they need solved.
- A
- 46
How does an Agile workflow differ from a more one-pass Software Development Life Cycle approach?
- A
Agile uses short development bursts followed by testing, feedback, and repetition
- B
Agile replaces testing with a compiler that automatically approves the program
- C
Agile requires all planning and coding to happen only once without revision
- D
Agile avoids users until the entire software product has been delivered
Correct answer
AAgile uses short development bursts followed by testing, feedback, and repetition
Explanation
The content contrasts a workflow with minimal repetition against Agile, which develops a short portion, tests it, gathers user feedback, and repeats the cycle.
- A
- 47
What is the broad significance of programming for computer use?
- A
Programming removes the need for applications, operating systems, and user interfaces
- B
Programming limits a computer to the capabilities built into its original hardware
- C
Programming makes computers useful only for browsing and streaming media
- D
Programming turns a computer into a flexible tool for creating solutions to problems
Correct answer
DProgramming turns a computer into a flexible tool for creating solutions to problems
Explanation
Programming allows users to move beyond relying only on existing applications and create their own computer-based solutions.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.