Docsity

Practice Final Exam - Introduction to Computing | CS 1301, Exams of Computer Science

Toggle sidebar
bg1
CS 1301 Practice Final Exam
NAME: Section:
Vocabulary (14 pts)
Match each term in the word bank with one of the statements below:
1. Contains printable characters and format sequences that indicate how to format
values
______2. A higher-order function that processes a sequence in some order and
accumulates a return value
______3. A higher-order function that applies a given function to a sequence of elements
(such as a list) and returns a sequence of results.
______4. A higher-order function that processes a sequence (typically a list) in some
order to produce a new data structure containing exactly those elements of the
original data structure for which a given predicate returns the Boolean value of
true
______5. The result of a program that python can’t interpret
______6. An error occurring while program is executing
______7. A program that fails to do what it was intended to do
______8. A formal sequence of instructions like a program, or recipe
______9. To write a data value in a file along with its type information so that it can be
reconstituted later
______10. A named collection of files, also called a folder
______11. A user-defined compound type that can be thought of as a template for the
objects that are instances of it
______12. The ability to define a new class that is a modified version of a previously
defined class
______13. The class from which a child class inherits
______14. A single point in a graphic image
Word Bank:
Format string reduce algorithm directory parent class
Map filter pickle inheritance
syntax error runtime error semantic error class pixel
pf3
pf4
pf5
Discount

On special offer

Partial preview of the text

Download Practice Final Exam - Introduction to Computing | CS 1301 and more Exams Computer Science in PDF only on Docsity!

CS 1301 Practice Final Exam NAME: Section: Vocabulary (14 pts) Match each term in the word bank with one of the statements below:

  1. Contains printable characters and format sequences that indicate how to format values ______2. A higher-order function that processes a sequence in some order and accumulates a return value ______3. A higher-order function that applies a given function to a sequence of elements (such as a list) and returns a sequence of results. ______4. A higher-order function that processes a sequence (typically a list) in some order to produce a new data structure containing exactly those elements of the original data structure for which a given predicate returns the Boolean value of true ______5. The result of a program that python can’t interpret ______6. An error occurring while program is executing ______7. A program that fails to do what it was intended to do ______8. A formal sequence of instructions like a program, or recipe ______9. To write a data value in a file along with its type information so that it can be reconstituted later ______10. A named collection of files, also called a folder ______11. A user-defined compound type that can be thought of as a template for the objects that are instances of it ______12. The ability to define a new class that is a modified version of a previously defined class ______13. The class from which a child class inherits ______14. A single point in a graphic image Word Bank: Format string reduce algorithm directory parent class Map filter pickle inheritance syntax error runtime error semantic error class pixel

Python Interpretations (20 pts) Act like python to interpret the following expression, and it’s type (integer, float, string, Boolean) Expression Result (2pts) Type (2 pts) 7 + 5 ‘Forty ’ + ‘seven’ 7/4 + 24 + 7**2. 3 < 8 (‘a’ < ‘b’)

Draw (20 pts) Using your code for mergesort, show how the computer reads and interprets the code to get to the results of [0.5, 3, 5, 7, 8, 14]

Writing Code (20 pts) Write a code that takes a picture and repaints it to have a green tint.