PCEP • Practice Test 18
Free PCEP practice test — 15 questions with explanations. Set 18. No signup required.
A company needs to calculate the average of three test scores entered by a user. The scores are integers. The programmer writes the following code:
s1 = input("Enter score 1: ") s2 = input("Enter score 2: ") s3 = input("Enter score 3: ") avg = (s1 + s2 + s3) / 3
print("Average:", avg)When run, the output is incorrect. What is the most likely cause?
Choose an answer to begin — your selection is scored in the full session.
15 questions · instant feedback and full explanations after every question.