Module 3 challenge :Get Started with Python (Google Advanced Data Analytics Professional Certificate) Answers 2025
Question 1
What loop repeats code until a condition is no longer met?
-
for loop ❌
-
else loop ❌
-
while loop ✅
-
if loop ❌
Explanation:
A while loop continues executing as long as its condition is True.
Question 2
The range() function starts from:
-
zero ✅
-
one ❌
-
three ❌
-
two ❌
Explanation:range(n) defaults to starting at 0, increasing by 1.
Question 3
Loop from 20 to 90 inclusive:
-
for x in range(20, 91): ✅
-
for x in range(21, 90): ❌
-
for x in range(21, 91): ❌
-
for x in range(20, 90): ❌
Explanation:range(20, 91) runs 20 → 90 because the stop value is exclusive.
Question 4
Step value in range(100, 501, 20):
-
500 ❌
-
501 ❌
-
100 ❌
-
20 ✅
Explanation:
The third argument is always the step.
Question 5
Concatenate 'air' and 'plane':
-
‘air’ % ‘plane’ ❌
-
‘air’ == ‘plane’ ❌
-
‘air’ / ‘plane’ ❌
-
‘air’ + ‘plane’ ✅
Explanation:
Using + joins strings together.
Question 6
index() interprets a string as a:
-
sequence of characters ✅
-
string slice ❌
-
substring ❌
-
boolean ❌
Explanation:index() searches a string by treating it as a series of individual characters.
Question 7
Find index of 'c' in the string:
-
vegetables.index(‘c’) ✅
-
index.spinach(‘c’) ❌
-
spinach.index(‘c’) ❌
-
index.vegetables(‘c’) ❌
Explanation:
You must call .index() on the variable that contains the string.
Question 8
Slice 'pen' from 'penguin':
-
animal[1:3] ❌
-
animal[3: ] ❌
-
animal[:3] ✅
-
animal[-1] ❌
Explanation:animal[:3] returns indexes 0–2 → 'pen'.
Question 9
format() inserts specific _____ into a larger string.
-
for loops ❌
-
while loops ❌
-
substrings ✅
-
libraries ❌
Explanation:format() inserts values (treated as substrings) into placeholders.
Question 10
Output of:
x = 1
y = 2
print(f'{x} + {y}')
-
‘1 + 2’ (string) ✅
-
‘3’ (string) ❌
-
’12’ (string) ❌
-
3 (int) ❌
Explanation:
The f-string prints the literal characters: 1 + 2, not the sum.
🧾 Summary Table
| Q# | Correct Answer |
|---|---|
| 1 | while loop |
| 2 | zero |
| 3 | for x in range(20, 91): |
| 4 | 20 |
| 5 | ‘air’ + ‘plane’ |
| 6 | sequence of characters |
| 7 | vegetables.index(‘c’) |
| 8 | animal[:3] |
| 9 | substrings |
| 10 | ‘1 + 2’ (string) |