answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
faltersainse [42]
2 years ago
11

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

dmissions 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 student’s test score (testScoreString)

A student's class rank (classRankString)

Write the statements to convert the string representation of a student’s 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.
Computers and Technology
1 answer:
Elza [17]2 years ago
4 0

Answer:

Python code is given below with appropriate comments

Explanation:

#Prompt the user to enter the test score and class rank.

testScore = input()

classRank = input()

#Convert test score and class rank to the integer values.

testScore = int(testScore)

classRank = int(classRank)

#If the test score is greater than or equal to 90.

if(testScore >= 90):

   #If the class rank is greater than or equal to 25,

   #then print accept message.

   if(classRank >= 25):

       print("Accept")

   

   #Otherwise, display reject message.

   else:

       print("Reject")

#Otherwise,

else:

   #If the test score is greater than or equal to 80.

   if(testScore >= 80):

       #If class rank is greater than or equal to 50,

       #then display accept message.

       if(classRank >= 50):

           print("Accept")

       

       #Otherwise, display reject message.

       else:

           print("Reject")

   

   #Otherwise,

   else:

       #If the test score is greater than or equal to

       #70.

       if(testScore >= 70):

           #If the class rank is greater than or equal

           #to 75, then display accept message.

           if(classRank >= 75):

               print("Accept")

           

           #Otherwise, display reject message.

           else:

               print("Reject")

       

       #Otherwise, display reject message.

       else:

           print("Reject")

You might be interested in
Anime question where do i watch Itadaki! Seieki! 100 points
EastWind [94]

Answer:

Crunchyroll or Funamation

Explanation:

8 0
2 years ago
Read 2 more answers
Which features should a study schedule include? Check all that apply.
Ivenika [448]

Answer: time of day, duration, due dates

Explanation: I am awsome

7 0
2 years ago
Read 2 more answers
What is the impact of VR on Educational Learning rather than games?​
nekit [7.7K]

Answer : Candice

Explanation: Candice penis fit in your mouth

3 0
2 years ago
What are threats to computer system
Readme [11.4K]
Theft or vandalism through to natural disasters are physical threats. Non-physical threats target the software and data on the computer systems, Like hackers or just straight up viruses. Also, untrustworthy apps or games can give your computer viruses as well.
3 0
2 years ago
A security analyst is interested in setting up an IDS to monitor the company network. The analyst has been told there can be no
elena55 [62]

Answer:

d. Port mirror

Explanation:

Port mirroring is a method to monitor network traffic and it is used in the Intrusion Detection Systems. It is also called Switched Port Analyzer and is used to analyse the network errors. This technique basically copies the network packets and sends or transmits these copied packed from one port to another in a network device such as a switch. This means that this technique is used to copy the network packets from one switch port and send the copy of these packets to another port where these packets are monitored. This is how it analyses the network errors and incoming traffic for irregular behavior and also this can be done without affecting the normal operation of the switch and other network processes. It is simple, inexpensive and easy to establish and use. The most important advantage of using mirrored ports is that it catches the traffic on several ports at once or can capture all of the network traffic.

4 0
2 years ago
Other questions:
  • Becky is preparing a document for her environmental studies project. She wants to check her document for spelling and grammar er
    5·2 answers
  • When ____ is pressed after entering an email address or web address, word automatically formats the address as a hyperlink, that
    15·2 answers
  • Column, bar, pie, line, and scatter are all types of_____
    9·1 answer
  • Choose all items that represent characteristics of a work samples.
    8·2 answers
  • ArgumentException is an existing class that derives from Exception; you use it when one or more of a method’s arguments do not f
    11·1 answer
  • Which of the following statements is true? Using existing exceptions makes the program less robust. Always create your own excep
    15·1 answer
  • The Coins class was created to hold all your loose change, kind of like a piggy bank! For this exercise, you are going to simula
    15·1 answer
  • What does NOT match with Agile Manifesto?
    9·1 answer
  • Write a method so that the main() code below can be replaced by simpler code that calls method calcMilesTraveled(). Original mai
    11·1 answer
  • Question 1:State the values of a, b, c, d and e after the following operations are carried out:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!