Skip to main content

Computer Science I Test Preparation - 488 Verified Questions

Page 1


Computer Science I Test Preparation

Course Introduction

Computer Science I is an introductory course that explores the fundamental concepts of computer science, including problem-solving techniques, algorithm development, and basic programming skills. Students learn core programming principles such as variables, data types, control structures, functions, and arrays using a modern programming language. Emphasis is placed on logical thinking, code readability, and debugging strategies to build a solid foundation for further study in computer science. The course often includes hands-on programming assignments and collaborative projects to reinforce theoretical knowledge with practical experience.

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) The instruction set for a microprocessor is unique and is typically understood only by the microprocessors of the same brand.

A)True

B)False

Answer: True

Q2) The smallest storage location in a computer's memory is known as a _____.

A) byte

B) ketter

C) switch

D) bit

Answer: D

Q3) A disk drive stores data by _______________ encoding it onto a circular disk.

Answer: magnetically

Q4) Where does a computer store a program and the data that the program is working with while the program is running?

A) Main memory

B) CPU

C) Secondary storage

D) Microprocessor

Answer: A

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) Python allows programmers to break a statement into multiple lines.

A)True

B)False

Answer: True

Q2) Python formats all floating-point numbers to two decimal places when outputting using the print statement.

A)True

B)False

Answer: False

Q3) Comments in Python begin with the # character.

A)True

B)False

Answer: True

Q4) The output of the following print statement is:

Print 'I\'m ready to begin'

A) Im ready to begin

B) I\'m ready to begin

C) I'm ready to begin

D) 'I\'m ready to begin'

Answer: C

Page 4

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

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) Decision structures are also known as selection structures.

A)True

B)False

Answer: True

Q2) The Python language is not sensitive to block structuring of code.

A)True

B)False

Answer: False

Q3) Boolean variables are commonly used as _______________ to indicate whether a specific condition exists.

Answer: Flags

Q4) The decision structure that has two possible paths of execution is known as _____.

A) single alternative

B) double alternative

C) dual alternative

D) two alternative

Answer: C

Q5) The logical _______________ operator reverses the truth of a Boolean expression.

Answer: not

Page 5

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

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) _______________-controlled loop causes a statement or set of statements to repeat as long as a condition is true.

Q2) _____ is the process of inspecting data that has been input to a program to make sure it is valid before it is used in a computation.

A) Input validation

B) Correcting data

C) Data validation

D) Correcting input

Q3) In flowcharting, the decision structure and the repetition structure both use the diamond symbol to represent the condition that is tested.

A)True

B)False

Q4) Which of the following represents an example to calculate the sum of the numbers (accumulator)?

A) total + number = total

B) number += number

C) total += number

D) total = number

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

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) A(n) _____ is a variable that receives an argument that is passed into a function.

A) global

B) argument

C) scope

D) parameter

Q2) A variable's _____ is the part of a program in which the variable may be accessed.

A) global

B) argument

C) scope

D) local

Q3) The _______________ chart is an effective tool that programmers use for designing and documenting functions.

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

A)True

B)False

Q5) The approach of _______________ makes the program easier to understand, test, and maintain.

Q6) In Python, a module's file name should end in _______________.

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) Which method will return an empty string when it has attempted to read beyond the end of a file?

A) read

B) getline

C) input

D) readline

Q2) A(n) _______________ access file retrieves data from the beginning of the file to the end of the file.

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

A)True

B)False

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

A)True

B)False

Q5) The term _______________ file is used to describe a file from which the program gets data.

Q6) Closing a file disconnects the communication between the file and the program. A)True

B)False

Page 8

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

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) Which list will be referenced by the variable number after the execution of the following code?

Number = range(0, 9, 2)

A) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

B) [1, 3, 5, 7, 9]

C) [2, 4, 6, 8]

D) [0, 2, 4, 6, 8]

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) What would be the value of the variable list2 after the execution of the following code?

List1 = [1, 2, 3]

List2 = list1

List1 = [4, 5, 6]

A) [1, 2, 3]

B) [4, 5, 6]

C) [1, 2, 3, 4, 5, 6]

D) invalid code

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

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) When accessing each character in a string, such as for copying purposes, you would typically use a while loop.

A)True

B)False

Q2) The _______________ method returns a copy of the string with all alphabetic letters converted to lower case.

Q3) An expression of the form string[i] = 'i' is a valid expression.

A)True

B)False

Q4) Strings are _______________, which means that once a string is created, it cannot be changed.

Q5) If the + operator is used on strings, it produces a string that is the combination of the two strings used as its operands.

A)True

B)False

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

A)True

B)False

Q7) The _______________ method returns the list of the words in the string.

Page 10

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

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) A dictionary can include the same value several times, but cannot include the same key several times.

A)True

B)False

Q2) The _______________ of two sets is a set that contains all the elements of both sets.

Q3) You created the following dictionary relationships = {'Jimmy':'brother'}. You then executed the following code, and received a KeyError exception. What is the reason for the exception?

Relationships['jimmy']

A) String comparisons are case sensitive so 'jimmy' does not equal 'Jimmy'.

B) You used the wrong syntax for creating the dictionary.

C) You should have used the code relationships['brother'].

D) There is a bug in Python.

Q4) The issubset method can be used to determine whether set1 is a subset of set2.

A)True B)False

Q5) 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.

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) Procedures operate on data items that are separate from the procedures.

A)True

B)False

Q2) A mutator method has no control over the way that a class's data attributes are modified.

A)True

B)False

Q3) Which section in the UML holds the list of the class's data attributes?

A) First

B) Second

C) Third

D) Fourth

Q4) What is another name for the mutator methods?

A) Setters

B) Getters

C) Instances

D) Attributes

Q5) Each object that is created from a class is called a(n) _______________ of the class.

Q6) A(n) _______________ method in a class initializes an object's data attributes.

Page 12

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

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) One of the ingredients of polymorphic behavior is the ability to define a method in a subclass, and then define a method with the same name in a superclass.

A)True

B)False

Q2) In a UML diagram, what does the open arrowhead point to?

A) Superclass

B) Subclass

C) Object

D) Method

Q3) Which of the following is the correct syntax for defining a class dining which inherits from class furniture?

A) class furniture(dining)

B) class dining(furniture)

C) class furniture(dining):

D) class dining(furniture):

Q4) Polymorphism works on any two class methods that have the same name.

A)True

B)False

Q5) Superclasses are also called _______________ classes.

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) Recursive function calls are _______________ efficient than loops.

Q2) A problem can be solved with recursion if it can be broken down into _____ problems.

A) smaller

B) one-line

C) manageable

D) modular

Q3) If the problem can be solved immediately without recursion, then the recursive function _____.

A) solves it and returns

B) Exits

C) returns the result

D) generates a run-time error

Q4) 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

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

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) A root widget's destroy method can be used as a callback function for a quit button. A)True B)False

Q2) A(n) _______________ is a widget that the user can click to cause an action to occur.

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

Q4) Python does not have GUI programming features built into the language itself.

A)True

B)False

Q5) A(n) _______________ is a container that can hold other widgets and organize the widgets in a window.

Q6) How many graphical widgets does the tkinter module provide?

A) Five

B) Ten C) Fifteen

D) Twenty

Q7) A(n) _______________ function is a function or method that executes when the user clicks the button.

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
Computer Science I Test Preparation - 488 Verified Questions by Quizplus - Issuu