Module 2 challenge: Basic Python Syntax Assessment :Crash Course on Python (Google IT Automation with Python Professional Certificate) Answers 2025
1. Complete the code
✔️
2. Value of "big" > "small"
Alphabetically, "b" < "s" → so "big" > "small" is False
✔️ False
❌ True
❌ big
❌ small
3. What is elif used for?
✔️ To handle more than two comparison cases
❌ Mark end of if
❌ Replace “or”
❌ Misspelling
4. exam_grade function
Top Score → score > 95
Pass → score >= 60
Else → Fail
✔️
5. Code in if block executes only when condition is:
✔️ True
❌ 0
❌ String
❌ False
6. letter_translator function
✔️
7. Output of print(sum(sum(1,2), sum(3,4)))
sum(1,2) = 3
sum(3,4) = 7
sum(3,7) = 10
✔️ 10
8. Value of ((10 >= 5*2) and (10 <= 5*2))
5×2 = 10
10 ≥ 10 → True
10 ≤ 10 → True
True and True → True
✔️ True
❌ False
❌ 10
❌ 5*2
9. return_nonnegative function
✔️
10. Benefits of good code style (Select all that apply)
✔️ Easier to maintain
✔️ Makes the intent of the code obvious
❌ Never has to be touched again
❌ Guarantees refactoring later
✅ Summary Table
| Q.No | Answer |
|---|---|
| 1 | IP_address = "192.168.1.10"host_name = "Printer Server 1" |
| 2 | False ✔️ |
| 3 | To handle more than two comparison cases ✔️ |
| 4 | score > 95 and score >= 60 |
| 5 | True ✔️ |
| 6 | letter == "a", letter == "b", etc., else "unknown" |
| 7 | 10 ✔️ |
| 8 | True ✔️ |
| 9 | Compare numbers and subtract smaller from larger |
| 10 | Easier to maintain ✔️, Intent obvious ✔️ |