The code checks if speed (100) is greater than 50, which is true.
Step 2: Determine the assigned voltage
Since condition is true, input_voltage is set to 12, then printed.
Final Answer:
12 -> Option A
Quick Check:
Speed > 50 sets voltage to 12 [OK]
Hint: Check condition true or false to find output [OK]
Common Mistakes:
Misreading the condition and choosing 6
Assuming initial input_voltage is printed
Thinking code has syntax error
4. Identify the error in this DC motor drive control pseudocode:
set speed = 0
while speed < 100
increase voltage by 1
speed = speed + 10
print(speed)
medium
A. Print statement is inside the loop
B. Voltage should decrease, not increase
C. Speed should decrease in the loop
D. Missing colon after while condition
Solution
Step 1: Check syntax of the while loop
The while statement lacks a colon at the end, which is required in Python-like syntax.
Step 2: Verify other statements
Increasing voltage and speed increment are logical; print is outside loop, so no error there.
Final Answer:
Missing colon after while condition -> Option D
Quick Check:
While loops need colon [:] [OK]
Hint: Look for missing punctuation in control statements [OK]
Common Mistakes:
Thinking voltage direction is wrong
Assuming print is inside loop incorrectly
Confusing speed increment logic
5. A DC motor drive uses a controller that adjusts voltage based on load torque to maintain constant speed. If the load torque suddenly increases, what should the controller do to keep speed steady?
hard
A. Decrease the voltage supplied to the motor
B. Keep voltage constant and reduce speed
C. Increase the voltage supplied to the motor
D. Turn off the motor to prevent damage
Solution
Step 1: Understand the effect of load torque increase
When load torque increases, the motor tends to slow down if voltage is unchanged.
Step 2: Determine controller action to maintain speed
The controller must increase voltage to provide more torque and keep speed constant.
Final Answer:
Increase the voltage supplied to the motor -> Option C
Quick Check:
More load needs more voltage to keep speed [OK]
Hint: More load means increase voltage to maintain speed [OK]
Common Mistakes:
Thinking voltage should decrease with load
Assuming speed must drop to protect motor
Choosing to turn off motor unnecessarily
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.