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

St james pharmacy woolwich - Assignment - Starbucks in japan case study - Peoplesoft uct ac za - Why is bling h2o so expensive - Explain transformational improvement in relation to organizational performance - Elmatics engineers pvt ltd - Business statistics excel - Bandello romeo and juliet - English essay "plot, character, or theme analysis essay" - How to prepare a final account in construction - I need help writing a paper - Api 17g 3rd edition - Institutional corrections in the philippines ppt - Proscenium arch stage diagram - Chemistry final exam answer key - 561 If you have not already commented on at least four adolescent health risk seminar presentations in the discussion board, please do so before Sunday, 11:59 p.m - Ablemail ams 12 12 30 with solar input - Paper - Application Security PCA - Define hess law of constant heat summation - High triglyceride diet mayo clinic - Need reliable partner for exam help? - A first look at communication theory 9th edition chapter summaries - Transition to work disability - Raymond vernon product life cycle theory pdf - Apple 1984 commercial analysis - Chinese lion dance meaning - Write a haiku generator - Alpha beta gamma delta symbols - Big data analytics case studies ppt - Dr david meldrum paediatrician - Difference between domestic and international human resource management - Schools interested in proposing a curriculum consistent with a nation at risk would probably offer - Tim winton the turning summary - Snowfall the avalanche at tunnel creek summary - Cobalt flame test color - Week6crim - Phenol red color - OE W 3 D - Pile driving blow count - Impact of green computing - Pakenham east precinct structure plan - Fdi tooth numbering system - Combined gas law problems worksheet - Nib hospital cover options - Consumer attitude metrics for guiding marketing mix decisions - Tennessee's neighbour crossword clue - Cmit 370 windows network proposal - Cbus super usi number - Guide to computer forensics and investigations 5th edition case project answers - Pluck and play guitar - Example of medium close up shot - 2009 cafs hsc paper - Good economics ia articles - Gap inc gallatin tn - Cis - American red cross financial statements 2014 - Research Paper In American Literature I - Self actualization in a sentence - Research paper on influences of Latin american art - Branches of physical science ppt - Tina jones musculoskeletal assessment - What is the least common factor of 8 and 12 - Ksf 2015 selected problems ecolier answers - 20.4 run ons practice 2 answers - Narrative theory and adaptation - Ethical principles in nursing essay - Chap. 3 Q MC - Web penske intranet logistics index - Chernoff bound for a poisson random variable - Fishing adventures rents small fishing boats - Asic current and historical company extract search - Costco wholesale corporation mission business model and strategy - Winner's sporting equipment manufactures sporting goods. selected costs from the past year include: - Divergence of a vector in cylindrical coordinates - The dessert - Bottlebrush australian bush flower essence - Human body has how many chromosomes - University of glasgow main building map - Music as poetry assignment - Best Chiropractors In Singapore - Writing about a tv show in an essay - Jet airways vision and mission - Define the key biographical characteristics - The company's adjusted trial balance as follows - 202 Questions - The trident reader essays about success - Need in 24 hours - How to write a purpose statement for research paper - Http www strategicbusinessinsights com vals presurvey shtml - 8-10 divett street port adelaide - International cruiser uno eu - Tpg home phone service - Chcccs011 learner guide - Discussion - Moonee valley council bin collection - Ethical theories in western philosophy - Walmart china supply chain transformation ppt - 593 boat harbour drive urangan qld