Summary
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
CODE:
# input statements # we are also converting string inputs to integer here testScore = int(input("Enter student's test score: ")) classRank = int(input("Enter student's class rank: ")) # conditional statements 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: print("Reject")
OUTPUT:
FOR HELP PLEASE COMMENT.
THANK YOU
Get Answers For Free
Most questions answered within 1 hours.