Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Computegrade In PYTHON Computer Science

05/05/2020 Client: azharr Deadline: 24 Hours

Rewrite the grade program from the previous chapter using a function called computegrade that takes a 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


<= 0.6


F




HINT:


1. Write a custom function with the definition def computegrade(<your score variable>):


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.




here is the code I did. run it, it works.


just need to reflect the computegrade and make that work too




# Given a given a numerical grade between 0.0 and 1.0


#This program converts the numerical score in letter grade.




#Prompt user for score between 0.0 and 1.0


prompt1 = "Please enter a score between 0.0 and 1.0: "




#convert input to float, because the input statement accepts user input as a string by default


#Wrap within a try-except code block to exit gracefully as the conversion will fall if the user supplied a non-numeric input!


try:


  score = input (prompt1)


  score = float(score)




#Print the result


  if score <=1.0:


   if 0.9 <= score <= 1.0:


      print("Your grade is an A")


   elif score >= 0.8:


      print("Your grade is a B")


   elif score >= 0.7:


      print("Your grade is a C")


   elif score >= 0.6:


      print("Your grade is a D")


   elif score < 0.6:


      print("Your grade is an F")






  else:


   print ("Error, score cannot be greater than 1.0")


except:


   print ("Error, please enter a number")






#End of Script

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Study Master

ONLINE

Study Master

$45
Great work lots of knowledge

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Study Master
Writer Writer Name Offer Chat
Study Master

ONLINE

Study Master

Please share further details to proceed.

$45 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Carrefour sa case solution - Which of these keeps prices below equilibrium? - Kansas vs michigan state 2018 live stream - Topic 6 insolation and the seasons answers - 1000 word case study due in 5hrs 8:00pm Central Time - Where is boxer eventually taken and what happens to him - How to calculate a theoretical yield - Global supply chain management v2 simulation answers - Hyde park neighborhood kansas city - Www studenthandouts com constitutional convention answers - One hundred years of solitude family tree - Igcse history coursework mark scheme - Abbreviations used in aged care - CHAPTER APPLICATION PAPER Doctoral Level) - Week 5 Discussion 1 Planning for ALL Differentiating Instruction - 9x 2 4y 2 36 graph - Pvc smoke developed index - Paulina adler stop breathing lyrics - Cheap Budget Prebuilt Gaming Pc 2021 - Bill nye plate tectonics - Heterarchy in business - What other factors contributed to the great depression - Yellow tail wine blue ocean - Free Trade - Weight on inclined plane - Nevada four guerrillas - En 60204 1 wire colors - What is formation damage - Skeptics and the art of persuasion os guiness audio - Kinetic energy golf swing - C229 paper - Work breakdown structure for planning a vacation - Career day activities for kindergarten - ME - Main - Homework 1 & 2 - 10 - Vaulting ambition macbeth act - You don't understand i coulda had class - Grace stirs up success google docs - MKT 345- Discussion 5 - Wheller gardens nursing home - Economics - Shop lululemon com secure orders returns jsp - Criminal justice / crime scene - Alibaba case study answers - Salomon v salomon [1897] ac 22 - Aly michalka wild horses - Melbourne school of psychology - Spaghetti tower earthquake proof - Direct connect gateway limits - Issa final exam case study answers - Ato deceased estate checklist - North hollywood polytechnic community adult school - When does capulet yell at juliet - Daisy chain shop stockton - International dimensions of organizational behavior free pdf - African journal of emergency medicine - A manufacturing company that produces a single product - History class - Mcgraw hill connect answers spanish - Putting the brakes on teenage driving speech analysis - Livingston company is a wholly owned subsidiary of rose corporation - Finding the precise median for a continuous variable - Chemistry - Attic needlework last chance - Heart of darkness chapter 3 questions - Discussion 3 - Religious literacy stephen prothero chapter summary - Innovation management - Amy's ice cream paper bag - Alphaville a victory of love - Umbrella of tourism and hospitality industry - Saudis expand regional power as others falter summary - World Civilization before 1650. - Plymouth art centre films - RESPIRATORY - Man utd hooligans 1970s - Neurotic anxiety existential therapy - Computer science class diagram - Describe two cryptographic applications and how they are used in Information System Security. - Walmart capstone simulation level 3 - Role of ais in value chain - Chesham park community college - Threats of substitutes in the airline industry - Hot fitness trends - 9/1 - Tiger river spas bengal plumbing diagram - Five dysfunctions of a team training material - English - Sw- 541 - Identity governance magic quadrant - Ict development index 2015 - Light affecting photosynthesis experiment - Https juror oscn net logan county - Octave MATLAB - Myed university of edinburgh - Arguments for driverless cars - Skin inflammation that primarily involves the papillary layer is termed - Mount richmond national park - Monza smash repairs northmead - CJT202 DISCUSSION - Lossography