Skip to main content

Introduction to Programming Study Guide Questions - 488 Verified Questions

Page 1


Introduction to Programming Study Guide Questions

Course Introduction

Introduction to Programming provides students with the foundational concepts and skills necessary to design, write, and debug basic computer programs. This course covers key programming principles such as variables, data types, control structures (including loops and conditionals), functions, and basic data structures. Students will learn to solve computational problems using a high-level programming language, with an emphasis on structured and logical thinking. Through hands-on exercises and projects, students develop practical skills that prepare them for further study in computer science and related disciplines.

Recommended Textbook

Starting Out with Python 3rd Edition by Tony Gaddis

Available Study Resources on Quizplus 13 Chapters

488 Verified Questions

488 Flashcards

Source URL: https://quizplus.com/study-set/1057

Page 2

Chapter 1: Introduction to Computers and Programming

Available Study Resources on Quizplus for this Chatper

36 Verified Questions

36 Flashcards

Source URL: https://quizplus.com/quiz/20921

Sample Questions

Q1) What type of volatile memory is usually used only for temporary storage while running a program?

A) ROM

B) TMM

C) RAM

D) TVM

Answer: C

Q2) All programs are normally stored in ROM and loaded into RAM as needed for processing.

A)True

B)False

Answer: False

Q3) The main reason for using secondary storage is to hold data for long periods of time, even when the power supply to the computer is turned off.

A)True

B)False Answer: True

Q4) Main memory is commonly known as _______________. Answer: random-access memory or RAM

To view all questions and flashcards with answers, click on the resource link above. Page 3

Chapter 2: Input, Processing, and Output

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20922

Sample Questions

Q1) A(n) _______________ is a single task that the program must perform in order to satisfy the customer.

Answer: software requirement

Q2) What is the output of the following print statement? Print('The path is D:\\sample\\test.')

A) 'The path is D:\\sample\\test.'

B) The path is D:\\sample\\test.

C) The path is D\\sample\\test.

D) The path is D:\sample\test.

Answer: D

Q3) A(n) _______________ character is a special character that is preceded with a backslash, appearing inside a string literal.

Answer: escape

Q4) When using the camelCase naming convention, the first word of the variable name is written in lowercase letters and the first character of the second and subsequent words are written in uppercase letters.

A)True

B)False

Answer: True

To view all questions and flashcards with answers, click on the resource link above. Page 4

Chapter 3: Decision Structures and Boolean Logic

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20923

Sample Questions

Q1) The _______________ statement is used to create a decision structure. Answer: if

Q2) In a decision structure, the action is _______________ executed because it is performed only when a certain condition is true.

Answer: conditionally

Q3) Which logical operators perform short-circuit evaluation?

A) or, not

B) not, and C) or, and D) and, or, not

Answer: C

Q4) An action in a single alternative decision structure is performed only when the condition is true.

A)True

B)False

Answer: True

Q5) Short-circuit evaluation is performed with the not operator.

A)True

B)False

Answer: False

To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: Repetition Structures

Available Study Resources on Quizplus for this Chatper

34 Verified Questions

34 Flashcards

Source URL: https://quizplus.com/quiz/20924

Sample Questions

Q1) A(n) _______________ total is a sum of numbers that accumulates with each iteration of a loop.

Q2) In Python, an infinite loop usually occurs when the computer accesses the wrong memory address.

A)True

B)False

Q3) When will the following loop terminate?

While keep_on_going != 999 :

A) When keep_on_going refers to a value less than 999

B) When keep_on_going refers to a value greater than 999

C) When keep_on_going refers to a value equal to 999

D) When keep_on_going refers to a value not equal to 999

Q4) In a nested loop, the inner loop goes through all of its iterations for every single iteration of an outer loop.

A)True

B)False

Q5) A(n) _______________ validation loop is sometimes called an error trap or an error handler.

Q6) A(n) _______________ is a special value that marks the end of a sequence of items.

Page 6

To view all questions and flashcards with answers, click on the resource link above.

Chapter 5: Functions and Modules

Available Study Resources on Quizplus for this Chatper

69 Verified Questions

69 Flashcards

Source URL: https://quizplus.com/quiz/20925

Sample Questions

Q1) In Python, there is no restriction on the name of a module file.

A)True

B)False

Q2) The Python library functions that are built into the Python _____ can be used by simply calling the function.

A) code

B) compiler

C) linker

D) interpreter

Q3) A(n) _____ constant is a global name that references a value that cannot be changed.

A) keyword

B) local

C) global

D) string

Q4) The first line in the function definition is known as the function _____.

A) header

B) block

C) return

D) parameter

To view all questions and flashcards with answers, click on the resource link above. Page 7

Chapter 6: Files and Exceptions

Available Study Resources on Quizplus for this Chatper

34 Verified Questions

34 Flashcards

Source URL: https://quizplus.com/quiz/20926

Sample Questions

Q1) Programmers usually refer to the process of _______________ data in a file as "writing data to" the file.

Q2) When a piece of data is read from a file, it is copied from the file into the program.

A)True

B)False

Q3) The ZeroDivisionError exception is raised when the program attempts to perform a division by zero.

A)True

B)False

Q4) A(n) _____ access file is also known as a direct access file.

A) sequential B) random C) numbered D) text

Q5) The term _______________ file is used to describe a file to which data is written.

Q6) Python allows the programmer to work with text and number files.

A)True B)False

To view all questions and flashcards with answers, click on the resource link above. Page 8

Chapter 7: Lists and Tuples

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20927

Sample Questions

Q1) Invalid indexes do not cause slicing expressions to raise an exception.

A)True

B)False

Q2) In slicing, if the end index specifies a position beyond the end of the list, Python will use the length of the list instead.

A)True

B)False

Q3) The _______________ exception is raised when a search item is not in the list being searched.

Q4) A(n) _______________ is a span of items that are taken from a sequence.

Q5) The _______________ method is commonly used to add items to a list.

Q6) Indexing starts at 1, so the index of the first element is 1, the index of the second element is 2, and so forth.

A)True

B)False

Q7) The index - 1 identifies the last element in a list.

A)True

B)False

Page 9

Q8) Lists are _______________, which means their elements can be changed.

To view all questions and flashcards with answers, click on the resource link above.

Chapter 8: More About Strings

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20928

Sample Questions

Q1) Which of the following string methods can be used to determine if a string contains only '\n' characters?

A) ischar()

B) isalpha()

C) istab()

D) isspace()

Q2) What will be assigned to s_string after the execution of the following code?

Special = '1357 Country Ln.'

S_string = special[4: ]

A) '1357'

B) 'Country Ln.'

C) ' Country Ln.'

D) Invalid code

Q3) What are the valid indexes for the string 'New York'?

A) 0 through 7

B) 0 through 8

C) -1 through -8

D) -1 through 6

Q4) A(n) _______________ exception will occur if you try to use an index that is out of range for a particular string.

To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Dictionaries and Sets

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20929

Sample Questions

Q1) What is the value of the variable phones after the execution of the following code?

Phones = {'John': '5555555', 'Julie' : '7777777'}

Phones['John'] = '1234567'

A) {'John': '5555555', 'Julie' : '7777777'}

B) {'John': '1234567', 'Julie' : '7777777'}

C) {'John': '1234567' }

D) invalid code

Q2) To determine whether a key is not included in a dictionary, or an element is not included in a set, you can use the _______________ operator.

Q3) What is the process used to convert an object to a stream of bytes that can be saved in a file?

A) Pickling

B) Streaming

C) Writing

D) Dumping

Q4) You would typically use a for loop to iterate over the elements in a set.

A)True

B)False

Q5) The built-in function _______________ returns the number of items in a set.

To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Classes and Object Oriented Programming

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20930

Sample Questions

Q1) The self parameter need not be named self, but it is strongly recommended to conform with standard practice.

A)True

B)False

Q2) The self parameter is required in every method of a class.

A)True

B)False

Q3) Object-oriented programming allows us to hide the object's data attributes from code that is outside the object.

A)True

B)False

Q4) _______________ programming is a method of writing software that centers on the actions that take place in a program.

Q5) Which method is automatically executed when an instance of the class is created in memory?

A) __state__

B) __obj__

C) __str__

D) __init__

To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 11: Inheritance

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20931

Sample Questions

Q1) Which method can you use to determine whether an object is an instance of a class?

A) isinstance

B) isclass

C) isobject

D) isinheritance

Q2) Superclasses are also called _______________ classes.

Q3) _______________ allows subclasses to have methods with the same names as methods in their superclasses.

Q4) What is the relationship called in which one object is a specialized version of another object?

A) Parent-child

B) Node

C) Is a

D) Class

Q5) New attributes and methods may be added to a subclass.

A)True

B)False

Q6) In an inheritance relationship, a television is a(n) _______________ of the electronics class.

To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 12: Recursion

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20932

Sample Questions

Q1) The majority of repetitive programming tasks are best done with _______________.

Q2) Function A calls function B, which calls function C, which calls function A. This is called _____ recursion.

A) continuous

B) direct C) three function call D) indirect

Q3) Recursive functions are _____ iterative algorithms.

A) more efficient than B) less efficient than C) as efficient as D) incomparable to

Q4) If the problem cannot be solved now, then a recursive function reduces it to a smaller but similar problem and _____.

A) exits

B) returns to the main function

C) returns to the calling function D) calls itself to solve the smaller problem

Q5) Some problems are _______________ solved with recursion than with a loop.

Q6) Recursive function calls are _______________ efficient than loops.

To view all questions and flashcards with answers, click on the resource link above. Page 14

Chapter 13: GUI Programming

Available Study Resources on Quizplus for this Chatper

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20933

Sample Questions

Q1) An info dialog box is a simple window that displays a message to the user and has an OK button that closes the dialog box.

A)True

B)False

Q2) _______________ are small windows that display information and allow the user to perform actions.

Q3) The pack method determines where a widget should be positioned.

A)True

B)False

Q4) In a GUI environment, no text input is possible.

A)True

B)False

Q5) Which widget allows the user to select a value by moving a slider along a track?

A) Entry

B) Scale

C) Scrollbar

D) Slider

Q6) The Label widget's _______________ method determines where a widget should be positioned and makes the widget visible when the main window is displayed.

Page 15

To view all questions and flashcards with answers, click on the resource link above.

Turn static files into dynamic content formats.

Create a flipbook
Introduction to Programming Study Guide Questions - 488 Verified Questions by Quizplus - Issuu