Question: 1.) A list contains 12 elements. So ____. the range of indexes is 0 to 11 the range of indexes is 1 to 12 the

1.) A list contains 12 elements. So ____.

the range of indexes is 0 to 11

the range of indexes is 1 to 12

the range of indexes is 0 to 12

the range of indexes is 0 to 13

2.) To access the 3rd thing in a dictionary named cars you'd _____

not be able to do this

use cars[3]

use cars[2]

use cars['2']

3.) If not all parameters have default values then any default parameters must all go at the end of the parameter list.

True

False

4.)

This is how you unpack a list.

m = [23, 45, 31] m => x, y, z

True

False

5.) A function named calc takes two integer arguments and returns the integer sum. Which of the following is the correct call to the funciton?

total = calc(2, 3)

total = calc()

total = calc(2)

total = calc("2", "3")

6.) How do you search a dictionary named menu for a key but providing a default value in case it is not found?

food = menu.get("Fri", "seafood")

food = menu.get(["Fri"],"seafood")

food = menu(["Fri"], "seafood")

food = get("seafood", "Fri")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!