Module 1 Graded Quiz: Python Basics :Python for Data Science, AI & Development (IBM Data Analyst Professional Certificate) Answers 2025
1. Question 1
What is the value of evening_temp?
morning_temp = 22evening_temp = morning_temp - 3
-
❌ 3
-
❌ 25
-
❌ 22
-
✅ 19
Explanation:
22 − 3 = 19.
2. Question 2
Correct Python expression for the final bill:
Food = 40
Drinks = 12
Service charge = 15% on total
-
❌
40 + 12 * 1.15 -
❌
(40 + 12) * 0.15 -
❌
(40 * 0.15) + (12 * 0.15) -
✅
(40 + 12) * 1.15
Explanation:
Total = (40 + 12) = 52
Final = 52 × 1.15
3. Question 3
Python’s dynamic typing system:
-
❌ Variables have no type until used
-
❌ Requires explicit declarations
-
❌ Can only hold one type
-
✅ Python automatically determines variable types based on assigned values
Explanation:
Python decides the variable type at assignment time.
4. Question 4
Convert True to integer:
-
❌ 0
-
❌ “True”
-
❌ Error
-
✅ 1
Explanation:int(True) → 1int(False) → 0
5. Question 5
Difference between string concatenation and numeric addition:
-
❌ Converts numbers to text
-
❌ Produces identical results
-
❌ Requires len()
-
✅ String concatenation joins text; numeric addition performs arithmetic
Explanation:"a" + "b" = "ab"3 + 4 = 7
6. Question 6
Transform "data science basics" to "Data Science Basics":
-
❌
upper() -
❌
proper()(not a Python method) -
❌
capitalize()→ Only first word becomes uppercase -
✅
article_title.title()
Explanation:.title() capitalizes every word.
7. Question 7
What does text[0:5] return for "Hello World"?
-
❌ “Hello ”
-
❌ “ello”
-
✅ “Hello”
-
❌ “Hello World”
Explanation:
Slice includes characters at index 0,1,2,3,4.
8. Question 8
What characteristic of Python supports wide adoption?
-
✅ Readability and a flat learning curve
-
❌ Requires advanced math
-
❌ Only works on Windows
-
❌ For scientific computing only
Explanation:
Python is popular because it’s easy to read and learn.
9. Question 9
Why use Jupyter Notebook for presenting findings?
-
❌ Only displays tables
-
❌ Auto-generates PowerPoints
-
❌ Hides technical details
-
✅ Allows code, text, and visuals together in a narrative flow
Explanation:
Notebooks mix code + markdown + charts for storytelling.
10. Question 10
Output of:
print("Python is \"awesome\"")
-
❌ Python is awesome
-
❌ Python is \awesome
-
❌ Error
-
✅ Python is “awesome”
Explanation:\" escapes the quote to print it.
🧾 Summary Table
| Q# | Correct Answer | Key Concept |
|---|---|---|
| 1 | 19 | Basic subtraction |
| 2 | (40+12)*1.15 | Service charge calculation |
| 3 | Python auto-determines types | Dynamic typing |
| 4 | 1 | Boolean to int |
| 5 | Concatenation vs addition | Text vs numeric behavior |
| 6 | title() | Capitalize each word |
| 7 | “Hello” | Slicing |
| 8 | Readability & easy learning | Why Python is popular |
| 9 | Mix code & narrative | Notebook uses |
| 10 | Python is “awesome” | Escape characters |