Answer to Question #276454 in Python for kika

Question #276454

Debugging lists three possibilities to consider if a function is not working.

  • Describe each possibility in your own words.
  • Define "precondition" and "postcondition" as part of your description.
  • Create your own example of each possibility in Python code. List the code for each example, along with sample output from trying to run it.
1
Expert's answer
2021-12-07T09:33:22-0500

There can be something wrong with the arguments being passed to the function.

There can be something wrong with the function itself.

There can be something wrong with the return value or how the return value is used is wrong.


Precondition- This is just a predicate that should hold upon entering into a function.

Postcondition- A predicate that must hold upon exiting a function.



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS