Question

HELP PYTHON 3.0 (NOT JAVA) 1.HTTP is the protocol that governs communications between web servers and...

HELP PYTHON 3.0 (NOT JAVA)

1.HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. Some of the codes and their meanings are listed below:

200, OK (fulfilled)

403, forbidden

404, not found

500, server error

Given an int variable status, write a statement that prints out, on a line by itself, the appropriate label from the above list based on status.

2.NOTE: in mathematics, division by zero is undefined. So, in Python, division by zero is always an error.

Write the necessary code to read values into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer division with truncation will do).

HOWEVER: if any value read in is not valid input, just print the message "INVALID".

0 0
Add a comment Improve this question Transcribed image text
Answer #1

\color{blue}\underline{1:}

if status == 200:
    print("OK (fulfilled)")
elif status == 403:
    print("forbidden")
elif status == 404:
    print("not found")
elif status == 500:
    print("server error")
Add a comment
Know the answer?
Add Answer to:
HELP PYTHON 3.0 (NOT JAVA) 1.HTTP is the protocol that governs communications between web servers and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ CodeLabs

    Not too sure what is wrong with the following code. I believe that it is something to do with the denominator being zero but not sure.NOTE: in mathematics, division by zero is undefined. So, in C++, division by zero is always an error.Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values into callsReceived and operatorsOnCalland print out the number of calls received per operator (integer division with truncation will do).code:cin...

  • Note: In mathematics, division by zero is undefined . so, in c++, division by zero is always an error given an integer v...

    Note: In mathematics, division by zero is undefined . so, in c++, division by zero is always an error given an integer variable named callsReceived and another integer variable named operatorsOnCall Write the necessary code to read values into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer divison with truncation will do).

  • Write in a program in C. NOTE: in mathematics, division by zero is undefined. So, in...

    Write in a program in C. NOTE: in mathematics, division by zero is undefined. So, in C, division by zero is always an error. Given a int variable  named  callsReceived and another int variable  named  operatorsOnCall write the necessary code to read values into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer division with truncation will do). HOWEVER: if any value read in is not valid input, just print the message "INVALID".

  • photos arent too go so the answer there is right but im trying to figure put...

    photos arent too go so the answer there is right but im trying to figure put why codelap took operatorsoncall as > and callsrecieved aas >= if that makes any sense. why not both > or >= Workbend M Mathway Math Pr. Rate My Professors Vonida Vol Instructions Display stdout NOTE: In mathematics, division by zero is undefined. So, in C++, division by zero is always an error Given a int variable named calls Received and another int variable named...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT