Programming Fundamentals MCQ PDF
Programming Fundamentals MCQ PDF
MCQ PDF
https://quizplus.com/study-set/895
14 Chapters
489 Verified Questions
Programming Fundamentals
MCQ PDF
Cou
Programming Fundamentals is an introductory course designed to provide students with
variables, data types, control structures (including conditionals and loops), functions,
arrays, and basic input/output operations. Students will learn to write, debug, and test
placed on logical thinking and developing effective coding practices, preparing students
Recommended Textbook
Starting Out with Python 2nd Edition by Tony Gaddis
Page 2
Chapter 1: Introduction to Computers and Programming
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17656
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) The Python language uses a compiler, which is a program that both translates and
executes the instructions in a high level language.
A)True
B)False
Answer: False
Q3) Which language from the following list is referred to as a low-level language?
A) C++
B) Assembly language
C) JAVA
D) Python
Answer: B
To view all questions and flashcards with Page 3 click on the resource link above.
answers,
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/17657
Sample Questions
Q1) 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
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) When the + operator is used with two strings, it performs string
_______________.
Answer: concatenation
To view all questions and flashcards with Page 4 click on the resource link above.
answers,
Chapter 3: Simple functions
Available Study Resources on Quizplus for this Chatper
34 Verified Questions
34 Flashcards
Source URL: https://quizplus.com/quiz/17658
Sample Questions
Q1) A local variable can be accessed from anywhere in the program.
A)True
B)False
Answer: False
Q2) The _____ argument specifies which parameter the argument should be passed
into.
A) keyword
B) local
C) global
D) string
Answer: A
Q4) The function header begins with the keyword _______________ followed by the
name of the function.
Answer: def
Sample Questions
Q1) A(n) _______________ statement will execute one block of statements if its
condition ist, or another block if its condition is false.
Q3) When using the _____ operator, both subexpressions must bet for the compound
expression to bet.
A) or
B) and
C) not
D) maybe
To view all questions and flashcards with answers, click on the resource link above.
Chapter 5: Repetition Structures
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17660
Sample Questions
Q1) A(n) _______________ total is a sum of numbers that accumulates with each
iteration of a loop.
Q2) In Python, the variable in the for clause is referred to as the _____ because it is the
target of an assignment at the beginning of each loop iteration.
A) target variable
B) loop variable
C) for variable
D) count variable
Q5) In Python, an infinite loop usually occurs when the computer accesses the wrong
memory address.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 7
Chapter 6: Value-Returning functions and Modules
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17661
Sample Questions
Q1) Python comes with _____ functions that have been already prewritten for the
programmer.
A) standard
B) library
C) custom
D) built-in
Q2) The math function, ceil(x), returns the smallest integer that is greater than or equal
to x.
A)True
B)False
Q4) Which of the following statements causes the interpreter to load the contents of the
random module into memory?
A) load random
B) import random
C) upload random
D) download random
Sample Questions
Q1) A(n) _____ access file is also known as a direct access file.
A) sequential
B) random
C) numbered
D) text
Q3) When a program needs to save data for later use, it writes the data in a(n)
_______________.
Q4) If the last line in a file is not terminated with a \n, the readline method will return the
line without a \n.
A)True
B)False
Q5) A(n) _______________ includes one or more statements that can potentially
raise an exception.
Q6) A(n) _______________ file contains data that has been encoded as text, using a
scheme such as ASCII. Page 9
To view all questions and flashcards with answers, click on the resource link above.
Chapter 8: Lists and Tuples
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17663
Sample Questions
Q1) The remove method removes all occurrences of the item from a list.
A)True
B)False
Q2) The _______________ exception is raised when a search item is not in the list
being searched.
Q5) Lists are _______________, which means their elements can be changed.
Q6) The first step in calculating the average of the values in a list is to get the total of the
values.
A)True
B)False
Q10) A(n) _______________ is a span of items that are taken from a sequence.
To view all questions and flashcards with answers, click on the resource link above.
Page 11
Chapter 9: More About Strings
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17664
Sample Questions
Q1) 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)
Q3) When accessing each character in a string, such as for copying purposes, you would
typically use a while loop.
A)True
B)False
Q4) Which list will be referenced by the variable list_strip after the execution of the
following code? list_string = '03/07/2008'
List_strip = list_string.split('/')
A) ['3', '7', '2008']
B) ['03', '07', '2008']
C) ['3', '/', '7', '/', '2008']
D) ['03', '/', '07', '/', '2008']
To view all questions and flashcards with answers, click on the resource link above.
Page 12
Chapter 10: Dictionaries and Sets
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17665
Sample Questions
Q1) Sets are immutable.
A)True
B)False
Q3) What is the correct structure for creating a dictionary of month names to be
accessed by month numbers?
A) { 1 ; 'January', 2 ; 'february', 3 ; 'March' }
B) { 1 : 'January', 2 : 'february', 3 : 'March' }
C) [ 1 : 'January', 2 : 'february', 3 : 'March' ]
D) { 1, 2, 3 : 'January', 'february', 'March' }
Q5) The issubset method can be used to determine whether set1 is a subset of set2.
A)True
B)False
Q6) You would typically use a for loop to iterate over the elements in a set.
A)True
B)False
Page 13
Q7) To add a single item to a set, you can use the set method _______________.
To view all questions and flashcards with answers, click on the resource link above.
Chapter 11: Classes and Object-Oriented Programming
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17666
Sample Questions
Q1) What is another name for the accessor methods?
A) Setters
B) Getters
C) Instances
D) Attributes
To view all questions and flashcards with answers, click on the resource link above.
Chapter 12: Inheritance
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17667
Sample Questions
Q1) When there are several classes that have many common data attributes, it is better
to write a(n) _____ to hold all the general data.
A) superclass
B) subclass
C) object
D) method
Q2) Which method can you use to determine whether an object is an instance of a
class?
A) isinstance
B) isclass
C) isobject
D) isinheritance
Q3) In a UML diagram, what does the open arrowhead point to?
A) Superclass
B) Subclass
C) Object
D) Method
Q4) In a UML diagram depicting inheritance, you only write the name of the subclass.
A)True
B)False
To view all questions and flashcards withPage 15 click on the resource link above.
answers,
Chapter 13: Recursion
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17668
Sample Questions
Q1) 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) What is the first step that needs to be taken in order to apply a recursive approach?
A) Identify at least one case in which the problem can be solved without recursion.
B) Determine a way to solve the problem in all other circumstances using recursion.
C) Identify a way to stop the recursion.
D) Determine a way to return to the main function.
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
To view all questions and flashcards with answers, click on the resource link above.
Page 16
Chapter 14: GUI Programming
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/17669
Sample Questions
Q1) The _____ accepts the user's commands.
A) register
B) CPU
C) operating system
D) ALU
Q2) Check buttons are displayed in groups and used to make mutually exclusive
selections.
A)True
B)False
Q4) To use the showinfo function, the tkinter.messagebox module needs to be imported.
A)True
B)False
Q5) A(n) _______________ is a container that can hold other widgets and organize
the widgets in a window.