Question: In this lab, you use the pseudocode in figure below to add code to a partially created Python program. When completed, college admissions officers should

In this lab, you use the pseudocode in figure below to add code to a partially created Python program. When completed, college admissions officers should be able to use the Python program to determine whether to accept or reject a student, based on his or her class rank. start input testScore, classRank if testScore >= 90 then if classRank >= 25 then output "Accept" else output "Reject" endif else if testScore >= 80 then if classRank >= 50 then output "Accept" else output "Reject" endif else if testScore >= 70 then if classRank >= 75 then output "Accept" else output "Reject" endif else output "Reject" endif endif endif stop Instructions Study the pseudocode in picture above. Write the interactive input statements to retrieve: A students test score (testScoreString) A student's class rank (classRankString) Write the statements to convert the string representation of a students test score and class rank to the integer data type (testScore and classRank, respectively). The rest of the program is written for you. Execute the program by clicking the Run button at the bottom and entering 87 for the test score and 60 for the class rank. Run the program again by entering 60 for the test score and 87 for the class rank.

code:

testScore=input('Enter Test Score : ') #Taking Test Score as the input

classRank=input('Enter Class Rank : ') #Taking class rank as the input

testScore=int(testScore) #converting test score to integer

classRank=int(classRank) #converting class rank to integer

if testScore >=90:

if classRank>=25:

print('Accept')

else:

print('Reject')

else:

if testScore >=80:

if classRank>=50:

print('Accept')

else:

print('Reject')

else:

if testScore >=70:

if classRank>=75:

print('Accept')

else:

print('Reject')

else: #This statement is for the time when none of the conditions are satisfied

print('Reject')

Same question done using elif statement for better understanding and code readability.

testScore=input('Enter Test Score : ') #Taking Test Score as the input

classRank=input('Enter Class Rank : ') #Taking class rank as the input

testScore=int(testScore) #converting test score to integer

classRank=int(classRank) #converting class rank to integer

if testScore >=90:

if classRank>=25:

print('Accept')

else:

print('Reject')

elif testScore >=80:

if classRank>=50:

print('Accept')

else:

print('Reject')

elif testScore >=70:

if classRank>=75:

print('Accept')

else:

print('Reject')

else: #This statement is for the time when none of the conditions are satisfied

print('Reject')

task:

Student is rejected correctly

1

0 out of 1 checks passed. Review the results below for more details.

Checks

Test CaseIncomplete

Rejected Student Score

Input

60 87 

Output

 File "/root/sandbox32532bbf/CollegeAdmission.py", line 25 Same question done using elif statement for better understanding and code readability. ^^^^^^^^ SyntaxError: invalid syntax 60 87 

Results

Reject

Show Details

0.00 out of 10.00

Student is accepted correctly

1

0 out of 1 checks passed. Review the results below for more details.

Checks

Test CaseIncomplete

Accepted Student Score

Input

87 60 

Output

 File "/root/sandboxe5359cc6/CollegeAdmission.py", line 25 Same question done using elif statement for better understanding and code readability. ^^^^^^^^ SyntaxError: invalid syntax 87 60 

Results

Accept

Show Details

In this lab, you use the pseudocode in figure below to add

code to a partially created Python program. When completed, college admissions officers

should be able to use the Python program to determine whether to

accept or reject a student, based on his or her class rank.

Student is rejected 0.00 out of 10.00 O out of 1 checks passed. Review the results below for more details. Checks Output Results Student is accepted correctly O out of 1 checks passed. Review the results below for more details. Output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!