Week 2 Unit 1: Self-test

22. October 2024

Question 1

What is the content of variable list1 after the following statements have been executed?

week2 unit1 f1

[1, 2, 3, 1, 2, 3]
Invalid statements; this leads to an error!
[1, 2, 3]
[1, 1, 2, 2, 3, 3]

Question 2

What is the content of variable var1 after the following statement has been executed?

week2 unit1 f2

"False"
5
False
No

Question 3

What is the content of list1 after the following statements have been executed?

week2 unit1 f3

[1, 3, 5]
[1, 3, 5, 1, 3, 5]
[1, 3, 5, 1]
[1, 1, 3, 5]

< Previous unit | Next unit > | Course Overview