Problem definition: A college wants to know how well its students did on an exam. The following program summarizes the results. The program asks a user to enter the results pass (1) or fail (2) for 10 students. It displays the number of passed and the number of failed. It displays a message "Raise error" if the number of passes is more than 8 You are asked to identify statement with syntax errors by selecting them as wrong and the correct statements as right

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section: Chapter Questions
Problem 7PP
icon
Related questions
Question
passed = 0.0
failed = 0
%3D
Wrong
Right
studentCounter
=D 1
while ( studentCounter =< 10):
result = int (input (Enter results (1 :
pass, 2 = fail): ))
if (result
1) :
passed
passed + 1
elif:
failed += 1
%3D
studentCounter = studentCounter + 1
print ('Passed '
passed)
print ("failed
Failed)
if passed > 8
print ('Raise error")
Transcribed Image Text:passed = 0.0 failed = 0 %3D Wrong Right studentCounter =D 1 while ( studentCounter =< 10): result = int (input (Enter results (1 : pass, 2 = fail): )) if (result 1) : passed passed + 1 elif: failed += 1 %3D studentCounter = studentCounter + 1 print ('Passed ' passed) print ("failed Failed) if passed > 8 print ('Raise error")
Problem definition:
A college wants to know how well its students did on an exam. The following program summarizes the results. The
program asks a user to enter the results pass (1) or fail (2) for 10 students. It displays the number of passed and the
number of failed. It displays a message "Raise error" if the number of passes is more than 8
You are asked to identify statement with syntax errors by selecting them as wrong and the correct statements as
right
Transcribed Image Text:Problem definition: A college wants to know how well its students did on an exam. The following program summarizes the results. The program asks a user to enter the results pass (1) or fail (2) for 10 students. It displays the number of passed and the number of failed. It displays a message "Raise error" if the number of passes is more than 8 You are asked to identify statement with syntax errors by selecting them as wrong and the correct statements as right
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr