Write a custom function with the definition def computegrade

Assignment Help Computer Engineering
Reference no: EM131917267

Problem

Score as its parameter and returns a grade as a string.

Score

Grade

> 0.9

A

> 0.8

B

> 0.7

C

> 0.6

D


F

1. Write a custom function with the definition def computegrade():

2. The function should compute the grade using the score variable based on the table above. You can use if-elif statements to accomplish this

3. Ensure your function has a "return" statement to return the computed grade back to the calling program

4. Once the function is defined, proceed to writing the part of the program that takes in user input for score.

5. Validate that the score is numeric within a try-except block.

6. Invoke the above-defined computegrade function with the user-supplied score. Ensure you capture the return value within your program into a variable placeholder, or else use the print statement to print the return value directly

7. Be sure to comment your program adequately!

8. Remember your Python code will be graded according to our class Rubric.

9. Submit your Python code file. Name it "XXXX-score-function.py" where XXXX is your name.

10. Submit also a Word document showing screen shots of the various testing conditions. Good programmers test all cases, so you should make sure you show tests for each possible grade level (A through F) plus error messages.

Reference no: EM131917267

Questions Cloud

How are rhel and centos different : How does this impact free linux distributions? How are RHEL and CentOS different? In linux, what is the default, super user account name?
What is the ph at the midpoint in the titration : When a 21.0 mL sample of a 0.308 M aqueous hypochlorous acid solution is titrated with a 0.388 M aqueous potassium hydroxide solution
Aqueous barium hydroxide solution : What is the pH at the equivalence point in the titration of a 18.7 mL sample of a 0.478 M aqueous acetic acid solution with a 0.370 M aqueous barium hydroxide.
Determine the ph during the titration : Determine the pH during the titration of 14.7 mL of 0.218 M nitric acid by 0.138 M potassium hydroxide at the following points:
Write a custom function with the definition def computegrade : Write a custom function with the definition def computegrade(): Validate that the score is numeric within a try-except block.
How businesses apply a set of beliefs in short term decision : You procure some business services but the vendor forgets to invoice you - and six months go by. Do you remind them to send the invoice? Why?
Organic chemical building blocks : Name and describe at least 3 ways in which the EARLY EARTH (and the other "Terrestrial" planets in the inner solar system; Mercury, Venus and Mars
How would you expect the solubility of silver fluoride : How would you expect the solubility of silver fluoride (AgF) to compare to the halides measured in lab (AgBr, AgCl, AgI)?
Write a article review - a better way to forecast : A Better Way to Forecast by Uriel Haran and Don A. Moore - What are the implications of the article for management practice

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd