sample exam

sample exam - Q1. What is the name of the function that...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
program? A) showVars() B) showNames() C) showFiles() D) showObjects() Key: A Q2. The following function will result in a JES error. Why? A) In line 1 the “:” is missing B) The commands are not properly indented C) Parentheses must be removed from line 1 D) A function name can not begin with a capital letter Key: A Q3. Which of the following commands will play the sound of the file "music.wav" ? A) play(makeSound("music.wav")) B) makeSound (play("music.wav")) C) makeSound ("music.wav") D) play ("music.wav") Key: A Q4.The following function is written to change the color of the pixels that have a white colored bottom neighbor to black. There is something wrong with this function. What should be the correction? 1 def changeColor(picture):
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

sample exam - Q1. What is the name of the function that...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online