The if statement is missing a colon (:) at the end of the condition line, which is required in Python-like syntax.
Step 2: Verify other parts
Comparison operator and indentation are correct. The method call is valid assuming range_finder object exists.
Final Answer:
Missing colon after if condition -> Option D
Quick Check:
if statement needs colon : [OK]
Hint: Always put colon after if condition [OK]
Common Mistakes:
Forgetting colon after if
Misaligning else indentation
Changing comparison operators unnecessarily
5.
You want the drone to maintain a height of 4 meters above ground using the range finder. Which code snippet correctly adjusts the drone's vertical speed based on the measured distance?