Week 1 Unit 4: Self-test
Last updated: about 14 hours ago (27. May 2025)
Question 1
Which of the following casting operations result in the Boolean value True
?
Note: There are 2 correct answers to this question.
bool(int("0"))
❌bool(0)
❌bool(2-2)
❌bool(1)
✅bool("False")
✅Question 2
Why are the following statements not robust, and could cause the program to crash if the wrong input is given?
Note: There are 2 correct answers to this question.