Quiz 2 - Introduction to Business Programming

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:49 AM on 9/25/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

20 Terms

1
New cards

Why should a beginner avoid writing customers = customers.sort() in the exercise?

sort() changes the existing list rather than returning a new sorted list to assign

2
New cards

Given departments = ['Accounting', 'Finance', 'Marketing', 'ISA'], what does print('Economics' in departments) display?

False

3
New cards

Which statement best matches the distinction taught in the exercise?

Lists can be changed; tuples normally cannot be changed.

4
New cards

Which statement in the exercise creates a separate shallow copy of original?

another_list = copy.copy(original)

5
New cards

Given inventory = ['Laptop', 'Mouse', 'Keyboard'], what remains after del inventory[0]?

['Mouse', 'Keyboard']

6
New cards

Given sales = [2400, 1200, 3100, 1800, 1500], what is the list after sales.sort()?

[1200, 1500, 1800, 2400, 3100]

7
New cards

Which statement removes the value 'Keyboard' from inventory, regardless of its current index?

inventory.remove('Keyboard')

8
New cards

Given departments = ['Accounting', 'Finance', 'Marketing', 'ISA'], what does departments.index('Marketing') return?

2

9
New cards

Which statement sorts the list sales from highest to lowest?

sales.sort(reverse=True)

10
New cards

Given departments = ['Accounting', 'Finance', 'Marketing', 'ISA'], what does print(len(departments)) display?

4

11
New cards

Given: cities = ['Atlanta', 'Savannah', 'Austin', 'Dallas', 'Seattle']. What does print(cities[1:4]) display?

['Savannah', 'Austin', 'Dallas']

12
New cards

Consider original = ['Laptop', 'Mouse', 'Keyboard'], another_list = original, another_list[0] = 'Tablet'. What is the first item in original afterward?

Tablet

13
New cards

Consider products = ['Laptop', 'Mouse', 'Keyboard'], for product in products: print(product). What does the variable product represent during each pass through the loop?

One current item from the products list

14
New cards

Consider inventory = ['Laptop', 'Mouse', 'Keyboard'], inventory[1] = 'Wireless Mouse', print(inventory[1]). What is displayed?

Wireless Mouse

15
New cards

Given sales = [1200, 1500, 1100, 1800, 2100], which statement displays only the first three values?

print(sales[:3])

16
New cards

Given: products = ['Laptop', 'Mouse', 'Keyboard', 'Monitor']. Which expression displays 'Keyboard'?

products[-2]

17
New cards

Given sales = [ ['Atlanta', 12000], ['Savannah', 8500], ['Austin', 15000] ]. What does print(sales[1][0]) display?

Savannah

18
New cards

Suppose inventory = ['Laptop', 'Mouse', 'Keyboard']. Which statement adds 'Monitor' to the END of the list?

inventory.append('Monitor')

19
New cards

Given inventory = ['Laptop', 'Mouse', 'Keyboard'], what is the result after inventory.insert(1, 'Tablet')?

['Laptop', 'Tablet', 'Mouse', 'Keyboard']

20
New cards

What is printed by this code? sales = [1200, 1500, 1100]; total = 0; for amount in sales: total = total + amount; print(total)

1200\n2700\n3800