




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





1 / 8
___compound data type ___slice ___traverse ___mutable ___increment ___decrement ___element ___aliases ___sequence ___nested list ___clone ___immutable type ___dictionary ___recursion ___iteration
2 / 8
How many times will the string โLine!โ be printed when n_lines is called with n=4? Number____________
4 / 8
Pretend that you are the Python Interpreter (IDLE window). What do you print or return when each of the following statements are entered?
Example: a[0] Result: True
Example: a[4:6] Result: _ [ [4,5,6], 84 ]_
5 / 8
changeValue( a, 3, "Hi!")
The list a will be [5, True,"Test","Hi!"]
7 / 8
Write a function reverseList(aList) that will return a reversed copy of aList. For example, after the following: a = [ 5, 10, True, "Hi!"]
b = reverseList(a)
The list b = ["Hi!", True, 10, 5], while a = [5, 10, True, "Hi!"].
Write a function findJ( aString ) that uses a while loop to find the index of the first occurrence of the letter 'J' in the aString parameter. The function should return the index it found. For example, findJ("This is Jays String") should return the number 8. Note that you should find both UPPERCASE J's and lowercase j's! If you do not find a J or a j you should return -1.
8 / 8 Extra Credit (1 point each)
What is the one sensor on the Scribbler that does not detect light of one form or another?
What is the decimal representation of the binary number { 101101}? ____________
What is the hexadecimal representation of the decimal number 34? _____________
What does CSS stand for? C__________ S________________ S_______________