PCEP Functions, Tuples, Dictionaries and Exceptions • Set 9
PCEP Functions, Tuples, Dictionaries and Exceptions Practice Test 9 — 15 questions with explanations. Free, no signup.
A developer writes a function to log sensor readings. The function is defined as:
def log_reading(sensor_id, value, unit="C"):
return f"{sensor_id}: {value}{unit}"The developer calls log_reading("T1", 22, unit="F"). What is the result?
Choose an answer to begin — your selection is scored in the full session.
15 questions · instant feedback and full explanations after every question.