Exam 6: Image Processing: Nested for Loops, Functions As Parameters, Namespaces, Lists of Lists
Exam 1: Introduction to Python: Introduction to Numeric Types, Turtle Graphics, Simple for Loops and Functions34 Questions
Exam 2: Pthon: Estimating PI: Math and Random Methods, Selection and Boolean Expressions, the Print Function33 Questions
Exam 3: Codes and Other Secrets: String Operators and Methods, the Len Built-In Function, Keyword Parameters, User Input33 Questions
Exam 4: Introducing the Python Collections: Lists, Dictionaries, Tuples, and Statistics33 Questions
Exam 5: Bigger Data: File Io: the While Loop, String Formatting, Reading Online Data in CSV and Json Formats33 Questions
Exam 6: Image Processing: Nested for Loops, Functions As Parameters, Namespaces, Lists of Lists33 Questions
Exam 7: Data Mining: Cluster Analysis: More on the While Loop; Parrallel Lists31 Questions
Exam 8: Cryptanalysis: Advanced Dictionaries and Lists, Regular Expressions32 Questions
Exam 9: Fractals: the Geometry of Nature: Recursion, Grammars and Production Rules33 Questions
Exam 10: Astronomy: Creating Classes, Writing Constructors, Accessors, Mutators and Special Methods33 Questions
Exam 11: Simulation:computer Simulation Using Objects34 Questions
Exam 12: Father Was a Rectangle: Inheritance and Object-Oriented Design32 Questions
Exam 13: Video Games: Multithreading, Event Handlers, Static Variables33 Questions
Select questions type
When a function is invoked, a new namespace known as the function namespace is created corresponding to the function itself.
(True/False)
4.8/5
(27)
Case Study 1:
>>> p = Pixel(200, 100, 150)
>>> p
(200, 100, 150)
>>> p.getRed()
1. ??????
>>> p.setBlue(20)
>>> p
2. ??????
>>>
-Refer to the session in the accompanying Case Study 1. What is printed on line 1?
(Multiple Choice)
4.7/5
(39)
Match each definition with its term.
-Created within a function.
(Multiple Choice)
4.8/5
(35)
How can you discover the names of the objects in the built-in namespace?
(Essay)
4.7/5
(31)
In Python, all the names defined in a program, whether for data or for functions, are organized into namespaces.
(True/False)
4.8/5
(38)
Case Study 2:
>>> def squareIt(n):
return n * n
>>> squareIt(3)
9
>>> squareIt(squareIt(3))
1. ??????
>>> squareIt
<function squareIt at 0x0000022740D68E18>
>>> z = squareIt
>>> z(3)
9
>>> z
2. ??????
-Refer to the session in the accompanying case study. What is printed on line 2?
(Multiple Choice)
4.8/5
(33)
Explain how the different Python namespaces are organized with respect to one another.
(Essay)
4.8/5
(33)
What module contains objects that allow us to construct and manipulate pixels?
(Multiple Choice)
4.9/5
(36)
What statement constructs a window that is 600 pixels wide and 400 pixels high?
(Multiple Choice)
4.7/5
(42)
Showing 21 - 33 of 33
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)