Skip to main content

Computer Science I Question Bank - 488 Verified Questions

Page 1


Computer Science I Question

Bank

Course Introduction

Computer Science I is an introductory course designed to provide students with a foundational understanding of computer science principles and programming. The course covers essential topics such as problem-solving strategies, algorithm development, and fundamental programming concepts using a high-level programming language like Python or Java. Students will learn about variables, data types, control structures (such as loops and conditionals), functions, basic data structures, and debugging techniques. Emphasis is placed on practical application through hands-on programming assignments and projects, preparing students for more advanced computer science courses and developing computational thinking skills applicable to various 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) Which of these is not a major component of a typical computer system?

A) Central processing unit

B) Main memory

C) Operating system

D) Secondary storage devices

Answer: C

Q2) The _____ coding scheme contains a set of 128 numeric codes that are used to represent characters in the computer memory.

A) Unicode

B) ASCII

C) ENIAC

D) twos complement

Answer: B

Q3) What is the largest value that can be stored in one byte?

A) 255

B) 128

C) 8

D) 65535

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 formats all floating-point numbers to two decimal places when outputting using the print statement.

A)True

B)False

Answer: False

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) Computer programs typically perform three steps: Input is received, some process is performed on the input, and output is produced.

A)True

B)False

Answer: True

Q4) When the + operator is used with two strings, it performs string

Answer: concatenation

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) The logical _______________ operator reverses the truth of a Boolean expression.

Answer: not

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

Answer: conditionally

Q3) Nested decision structures are one way to test more than one condition. A)True

B)False

Answer: True

Q4) A(n) _______________ expression is made up of two or more Boolean expressions.

Answer: compound

Q5) A(n) _______________ decision structure provides only one alternative path of execution.

Answer: single alternative

Q6) Python provides a special version of a decision structure known as the _______________ statement, which makes the logic of the nested decision structure simpler to write.

Answer: if-elif-else

Answer: if Page 5

Q7) The _______________ statement is used to create a decision structure.

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

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) The _______________ function is a built-in function that generates a list of integer values.

Q2) What is not an example of an augmented assignment operator?

A) *=

B) /=

C) -=

D) <=

Q3) What type of loop structure repeats the code a specific number of times?

A) Condition-controlled loop

B) Number-controlled loop

C) Count-controlled loop

D) Boolean-controlled loop

Q4) The acronym _______________ refers to the fact that the computer cannot tell the difference between good data and bad data.

Q5) The first line in the while loop is referred to as the condition clause.

A)True

B)False

Q6) A(n) _______________ structure causes a statement or set of statements to execute repeatedly.

Page 7

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) A(n) _____ chart is also known as a structured chart.

A) flow

B) data

C) hierarchy

D) organizational

Q2) The _____ of a local variable is the function in which the variable is created.

A) global

B) defined

C) local

D) scope

Q3) The term _______________ is used to describe any mechanism that accepts input, performs some operation that cannot be seen, and produces output.

Q4) Python function names follow the same rules for naming variables.

A)True

B)False

Q5) Different functions can have local variables with the same names.

A)True

B)False

Q6) The return values of the trigonometric functions in Python are in

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

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) In Python, there is nothing that can be done if the program tries to access a file to read that does not exist.

A)True

B)False

Q2) An exception handler is a piece of code that is written using the try/except statement.

A)True

B)False

Q3) A(n) _______________ gives information regarding the line number(s) that caused an exception.

Q4) A filename _______________ is a short sequence of characters that appear at the end of a filename preceded by a period.

Q5) A(n) _______________ file contains data that has been encoded as text, using a scheme such as ASCII.

Q6) Python allows the programmer to work with text and number files. A)True B)False

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

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

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) What is the advantage of using tuples over lists?

A) Tuples are not limited in size.

B) Tuples can include any data type as an element.

C) Processing a tuple is faster than processing a list.

D) There is no advantage.

Q2) What would be the value of the variable list after the execution of the following code?

List = [1, 2, 3, 4]

List[3] = 10

A) [1, 2, 3, 10]

B) [1, 2, 10, 4]

C) [1, 10, 10, 10]

D) invalid code

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

A)True

B)False

Q4) A list cannot be passed as an argument to a function.

A)True

B)False

Q5) The built-in function _______________ returns the length of a sequence.

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

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) Indexing of a string starts at 1, so the index of the first character is 1, the index of the second character is 2, and so forth.

A)True

B)False

Q2) Which method would you use to determine whether a substring is the suffix of a string?

A) endswith(substring)

B) find(substring)

C) replace(string, substring)

D) startswith(substring)

Q3) Which method would you use to determine whether a substring is present in a string?

A) endswith(substring)

B) find(substring)

C) replace(string, substring)

D) startswith(substring)

Q4) The _______________ operator can be used to determine whether one string is contained in another string.

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

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

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) In order to avoid KeyError exceptions, you can check whether a key is in the dictionary using the _____ operator.

A) included

B) of

C) in

D) not in

Q2) What is the number of the first index in a list dictionary?

A) 0

B) 1

C) Dictionary is not indexed by number.

D) Size of the dictionary minus one.

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) The index of the first element in a set is 0.

A)True

B)False

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

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) Object-oriented programming allows us to hide the object's data attributes from code that is outside the object.

A)True

B)False

Q2) What type of method provides a safe way for code outside a class to retrieve the values of attributes, without exposing the attributes in a way that they could be changed by the code outside the method?

A) Accessor

B) Mutator

C) Setter

D) Class

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

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

A)True

B)False

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

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

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) Of the two classes Cola and Soda, which would most likely be the subclass?

A) Cola

B) Soda

C) Both

D) Either

Q2) Superclasses are also called _______________ classes.

Q3) Each subclass has a method named __init__ that overrides the superclass's __init__.

A)True

B)False

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) _______________ is used to create an 'is a' relationship among classes.

Page 14

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

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) A function is called from the main function for the first time. It then calls itself seven times. What is the depth of recursion?

A) Eight

B) Two

C) One

D) Seven

Q2) What defines the depth of recursion?

A) The length of the algorithm

B) The numbers of function calls

C) The number of times the function calls itself

D) The number of times it goes back to the main function

Q3) A recursion in which a function directly calls itself is known as _______________ recursion.

Q4) A recursive function includes _____ which are not necessary in a loop structure.

A) function calls

B) conditional clauses

C) overhead actions

D) object instances

Q5) Recursive function calls are _______________ efficient than loops.

Q6) The majority of repetitive programming tasks are best done with

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

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) Check buttons are displayed in groups and used to make mutually exclusive selections.

A)True

B)False

Q2) A root widget's destroy method can be used as a callback function for a quit button.

A)True

B)False

Q3) The _______________ widget is used to display text in a window.

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

Q5) A(n) _______________ allows the user to interact with the operating system and other programs through graphical elements on the screen.

Q6) In Python, what module is used to create a GUI program?

A) tkinter

B) Pgui

C) gint

D) pygui

Q7) The GUI popularized the use of the _______________ as an input device.

Page 16

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 Question Bank - 488 Verified Questions by Quizplus - Issuu