Exam 6: Image Processing: Nested for Loops, Functions As Parameters, Namespaces, Lists of Lists

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

We can access a particular pixel by using the getPixel method.

Free
(True/False)
4.9/5
(42)
Correct Answer:
Verified

True

Match each definition with its term. -Holds the name of the current namespace.

Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
Verified

A

Match each definition with its term. -Includes all of the system-defined names of functions and data types used regularly in Python.

Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
Verified

C

To create a negative pixel, we subtract the red, green, and blue intensities from 255.

(True/False)
4.8/5
(41)

What terms would be used to describe the numbers 3 and 4 in the following code listing? Why? >>> hypotenuse(3, 4) 5.0

(Essay)
4.8/5
(35)

Parameters that are defined within a function are called:

(Multiple Choice)
4.9/5
(37)

What are the ramifications of the call by assignment parameter in Python? How does program execution differ depending on whether the actual parameter is mutable or immutable?

(Essay)
4.9/5
(41)

How are parameters passed into a function in Python?

(Essay)
4.8/5
(32)

What method would you use to get the width of an image?

(Multiple Choice)
4.8/5
(32)

Match each definition with its term. -Tries to extract feature information from an image by finding places in the image that have dramatic changes in color intensity values.

(Multiple Choice)
4.8/5
(32)

What are namespaces? Describe the builtins namespace.

(Essay)
4.8/5
(39)

What is the name for the type of iteration shown in the session below? >>> for num in range(3): For ch in "cat": Print(num, ch)

(Multiple Choice)
4.8/5
(34)

When a window is constructed, it is not immediately displayed.

(True/False)
4.8/5
(38)

Provide a description on how you might use a Python program to resize an image.

(Essay)
4.7/5
(35)

What kinds of operators can be used with a function?

(Essay)
4.8/5
(32)

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 2?

(Multiple Choice)
4.8/5
(35)

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 2. What is printed on line 1?

(Multiple Choice)
4.8/5
(39)

How many different color combinations are possible in the RGB color model?

(Multiple Choice)
4.8/5
(35)

A color with 255 red intensity, 0 green intensity, and 255 blue intensity will be:

(Multiple Choice)
4.9/5
(38)

When creating an empty image, what is the color of each pixel?

(Multiple Choice)
4.8/5
(45)
Showing 1 - 20 of 33
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)