OA. free
Free
MathWorks Core Computer Science Core Computer Science Medium

What is the expected output?

MathWorks technical mcq question, verified with a worked answer. Free to practise - no sign-up.

What is the expected output?

temp = 'Math'
List = []
for i in range(len(temp)):
    List.append(temp)
    temp = 'Physics'
print(List)

Pick ONE option

Choose one option.
Show answer & explanation
Answer: A. A) `['Math', 'Physics', 'Physics', 'Physics', 'Physics', 'Physics', 'Physics']`

Standard evaluation according to engineering and computational science principles.

Step-by-step Derivation:
Step 1: Analyze problem specification.
Step 2: Derive theoretical solution.
Step 3: Select corresponding answer option.