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 inputstatements 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 (testScoreand classRank, respectively).
The rest of the program is written for you.
Execute the program by clicking the "Run Code" button at the bottom and entering 87for 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started