follow the instructions exactly as laid out in the file
Page 1 of 4 Page 1 of 4 (CH5) Program Assignment Instructions Last Changed: 8/22/2020 12:28 PM Read and follow the directions below carefully and perform the steps in the order listed. You will be solving one program as instructed and turning in your work electronically via an uploaded file within Eagle Online/Canvas and copy & paste the program to the Text Entry box as well. Make sure and check your work prior to uploading the assignment. Instructions 1. Using Python IDLE, create a New Empty Script File in your working drive. Note: refer to (SET) How to Download Install and Use Python IDLE link within module 2 on how to create script file 2. Save the script file with the name CH5LastFirst, making sure to know where you saved it NOTE: Where LastFirst is your actual Lastname and Firstname. For Example, if your name is Mary Smith then your file name should be named: CH5SmithMary.py (Reminder: You don’t need to add the .py extension, IDLE will automatically add the extension) 3. You will develop a Test Grade Calculator Program (using functions) as described below: a. Write a modular program (using functions described in step 4b below), that accepts three test scores, validates each test score (to be in the range 0-100), drops the lowest test score, calculates the average of the two highest test scores (after dropping the lowest test score), and then determines the corresponding letter grade (based on the grading formula in the table below): Avg. Test Score Letter Grade >= 90 A 80-89 B 70-79 C 60-69 D< 60 f b. the program should display the output/results including the lowest test score dropped, the average test score (formatted to 2 decimal places), and the corresponding letter grade (note: other than the data input, your output should look exactly like in the below table showing a few sample runs for you to compare, the items shown after the colon symbol are what you enter as input; those items can vary for each sample run): 1. 2. 3. 4. page 2 of 4 page 2 of 4 5. 6. 4. a. the first thing you should enter in your python program script file (ch5lastfirst.py file created in step 2) is a top comment block which includes the following: """ name: enter your full name here lab: chapter 5 - functions description: this needs to be at least a paragraph explanation of the program (in your own words) """ b. below the top comment block, type the actual python code for the problem described in step 3. make sure to include the functions as described below exactly! (refer to the sample code screenshot below with function calls and definition examples and hints): 1. get_score() this should be a value returning function called by main() function, that accepts no arguments. this function asks the user to enter a test score, validates it (to be in the range 0-100), and returns the test score back to the main() function. this function is called 3 times to receive the 3 validated test scores (refer to line #s 17 and 27 - 33 in the below sample code screenshot for hints on how this function is called, input prompts are provided, and each test score could be validated and returned) 2. find_lowest() this should be a value returning function called by main function, that accepts three test score arguments. this function should determine and return back to the main function the lowest of the three test scores to drop (refer to line #s 22 and 35 - 38 in the below screenshot for on how this function is called and hints for finding lowest score) 3. calc_average() this should be a value returning function called by main function, that accepts four arguments - three test scores, and the lowest score. this function should find and return the average of the two highest test scores back to the main function (refer to line #s 40 - 43 in the below screenshot for hints) 4. find_grade() this should be a value returning function called by main function that accepts one average argument. this function should determine and return the corresponding letter grade (using if/elif/else logic) back to the main function (refer to line #s 45 - 50 in the below screenshot for hints) 5. display_results() this should be a void function called by main function that accepts three arguments - lowest test score dropped, the average of the two highest test scores (formatted up to 2 decimals), and the letter grade variable and displays them (refer to line #s 52 - 57 in the below sample code screenshot for hints and step 3b table above for sample output screenshots) make sure to include the following in your program as well: i. define appropriate/descriptive variables and constants (refer to line #s 8 – 11, 17, 2, & 28 in the page 3 of 4 page 3 of 4 below screenshot for examples) ii. have enough documentation for understandability of your program by including a comment block prior to each function describing in your own words the purpose of each function (refer to example programs listed in canvas modules) iii. have proper indentation and line spacing for readability of your program (refer to example programs listed in canvas modules) 6. after completing your program as instructed, make sure to run your program file to obtain the output/result as page 4 of 4 page 4 of 4 required (refer to the screenshots in the table above in step 3b for various inputs entered and output displayed) 7. you may now proceed to program assignment instructions and upload link within this module and follow the steps in the link or from steps below to submit your work as a text entry as well as file upload (an attached .py file): a. first, to submit your program as text entry, follow the steps below: • choose the submit assignment button (top right), • choose text entry tab, • copy/paste your python code from the program/script file to the text box, • choose submit assignment to complete the text entry submission. b. now, to submit your python code as a file upload, follow the steps below: • choose the re-submit assignment button (top right), • make sure file upload tab is selected this time, • choose browse to locate your program/script file to add (ch5lastfirst.py file), • choose submit assignment to complete program/script file upload. (ch5) program assignment instructions 60="" f="" b.="" the="" program="" should="" display="" the="" output/results="" including="" the="" lowest="" test="" score="" dropped,="" the="" average="" test="" score="" (formatted="" to="" 2="" decimal="" places),="" and="" the="" corresponding="" letter="" grade="" (note:="" other="" than="" the="" data="" input,="" your="" output="" should="" look="" exactly="" like="" in="" the="" below="" table="" showing="" a="" few="" sample="" runs="" for="" you="" to="" compare,="" the="" items="" shown="" after="" the="" colon="" symbol="" are="" what="" you="" enter="" as="" input;="" those="" items="" can="" vary="" for="" each="" sample="" run):="" 1.="" 2.="" 3.="" 4.="" page="" 2="" of="" 4="" page="" 2="" of="" 4="" 5.="" 6.="" 4.="" a.="" the="" first="" thing="" you="" should="" enter="" in="" your="" python="" program="" script="" file="" (ch5lastfirst.py="" file="" created="" in="" step="" 2)="" is="" a="" top="" comment="" block="" which="" includes="" the="" following:="" """="" name:="" enter="" your="" full="" name="" here="" lab:="" chapter="" 5="" -="" functions="" description:="" this="" needs="" to="" be="" at="" least="" a="" paragraph="" explanation="" of="" the="" program="" (in="" your="" own="" words)="" """="" b.="" below="" the="" top="" comment="" block,="" type="" the="" actual="" python="" code="" for="" the="" problem="" described="" in="" step="" 3.="" make="" sure="" to="" include="" the="" functions="" as="" described="" below="" exactly!="" (refer="" to="" the="" sample="" code="" screenshot="" below="" with="" function="" calls="" and="" definition="" examples="" and="" hints):="" 1.="" get_score()="" this="" should="" be="" a="" value="" returning="" function="" called="" by="" main()="" function,="" that="" accepts="" no="" arguments.="" this="" function="" asks="" the="" user="" to="" enter="" a="" test="" score,="" validates="" it="" (to="" be="" in="" the="" range="" 0-100),="" and="" returns="" the="" test="" score="" back="" to="" the="" main()="" function.="" this="" function="" is="" called="" 3="" times="" to="" receive="" the="" 3="" validated="" test="" scores="" (refer="" to="" line="" #s="" 17="" and="" 27="" -="" 33="" in="" the="" below="" sample="" code="" screenshot="" for="" hints="" on="" how="" this="" function="" is="" called,="" input="" prompts="" are="" provided,="" and="" each="" test="" score="" could="" be="" validated="" and="" returned)="" 2.="" find_lowest()="" this="" should="" be="" a="" value="" returning="" function="" called="" by="" main="" function,="" that="" accepts="" three="" test="" score="" arguments.="" this="" function="" should="" determine="" and="" return="" back="" to="" the="" main="" function="" the="" lowest="" of="" the="" three="" test="" scores="" to="" drop="" (refer="" to="" line="" #s="" 22="" and="" 35="" -="" 38="" in="" the="" below="" screenshot="" for="" on="" how="" this="" function="" is="" called="" and="" hints="" for="" finding="" lowest="" score)="" 3.="" calc_average()="" this="" should="" be="" a="" value="" returning="" function="" called="" by="" main="" function,="" that="" accepts="" four="" arguments="" -="" three="" test="" scores,="" and="" the="" lowest="" score.="" this="" function="" should="" find="" and="" return="" the="" average="" of="" the="" two="" highest="" test="" scores="" back="" to="" the="" main="" function="" (refer="" to="" line="" #s="" 40="" -="" 43="" in="" the="" below="" screenshot="" for="" hints)="" 4.="" find_grade()="" this="" should="" be="" a="" value="" returning="" function="" called="" by="" main="" function="" that="" accepts="" one="" average="" argument.="" this="" function="" should="" determine="" and="" return="" the="" corresponding="" letter="" grade="" (using="" if/elif/else="" logic)="" back="" to="" the="" main="" function="" (refer="" to="" line="" #s="" 45="" -="" 50="" in="" the="" below="" screenshot="" for="" hints)="" 5.="" display_results()="" this="" should="" be="" a="" void="" function="" called="" by="" main="" function="" that="" accepts="" three="" arguments="" -="" lowest="" test="" score="" dropped,="" the="" average="" of="" the="" two="" highest="" test="" scores="" (formatted="" up="" to="" 2="" decimals),="" and="" the="" letter="" grade="" variable="" and="" displays="" them="" (refer="" to="" line="" #s="" 52="" -="" 57="" in="" the="" below="" sample="" code="" screenshot="" for="" hints="" and="" step="" 3b="" table="" above="" for="" sample="" output="" screenshots)="" make="" sure="" to="" include="" the="" following="" in="" your="" program="" as="" well:="" i.="" define="" appropriate/descriptive="" variables="" and="" constants="" (refer="" to="" line="" #s="" 8="" –="" 11,="" 17,="" 2,="" &="" 28="" in="" the="" page="" 3="" of="" 4="" page="" 3="" of="" 4="" below="" screenshot="" for="" examples)="" ii.="" have="" enough="" documentation="" for="" understandability="" of="" your="" program="" by="" including="" a="" comment="" block="" prior="" to="" each="" function="" describing="" in="" your="" own="" words="" the="" purpose="" of="" each="" function="" (refer="" to="" example="" programs="" listed="" in="" canvas="" modules)="" iii.="" have="" proper="" indentation="" and="" line="" spacing="" for="" readability="" of="" your="" program="" (refer="" to="" example="" programs="" listed="" in="" canvas="" modules)="" 6.="" after="" completing="" your="" program="" as="" instructed,="" make="" sure="" to="" run="" your="" program="" file="" to="" obtain="" the="" output/result="" as="" page="" 4="" of="" 4="" page="" 4="" of="" 4="" required="" (refer="" to="" the="" screenshots="" in="" the="" table="" above="" in="" step="" 3b="" for="" various="" inputs="" entered="" and="" output="" displayed)="" 7.="" you="" may="" now="" proceed="" to="" program="" assignment="" instructions="" and="" upload="" link="" within="" this="" module="" and="" follow="" the="" steps="" in="" the="" link="" or="" from="" steps="" below="" to="" submit="" your="" work="" as="" a="" text="" entry="" as="" well="" as="" file="" upload="" (an="" attached="" .py="" file):="" a.="" first,="" to="" submit="" your="" program="" as="" text="" entry,="" follow="" the="" steps="" below:="" •="" choose="" the="" submit="" assignment="" button="" (top="" right),="" •="" choose="" text="" entry="" tab,="" •="" copy/paste="" your="" python="" code="" from="" the="" program/script="" file="" to="" the="" text="" box,="" •="" choose="" submit="" assignment="" to="" complete="" the="" text="" entry="" submission.="" b.="" now,="" to="" submit="" your="" python="" code="" as="" a="" file="" upload,="" follow="" the="" steps="" below:="" •="" choose="" the="" re-submit="" assignment="" button="" (top="" right),="" •="" make="" sure="" file="" upload="" tab="" is="" selected="" this="" time,="" •="" choose="" browse="" to="" locate="" your="" program/script="" file="" to="" add="" (ch5lastfirst.py="" file),="" •="" choose="" submit="" assignment="" to="" complete="" program/script="" file="" upload.="" (ch5)="" program="" assignment=""> 60 f b. the program should display the output/results including the lowest test score dropped, the average test score (formatted to 2 decimal places), and the corresponding letter grade (note: other than the data input, your output should look exactly like in the below table showing a few sample runs for you to compare, the items shown after the colon symbol are what you enter as input; those items can vary for each sample run): 1. 2. 3. 4. page 2 of 4 page 2 of 4 5. 6. 4. a. the first thing you should enter in your python program script file (ch5lastfirst.py file created in step 2) is a top comment block which includes the following: """ name: enter your full name here lab: chapter 5 - functions description: this needs to be at least a paragraph explanation of the program (in your own words) """ b. below the top comment block, type the actual python code for the problem described in step 3. make sure to include the functions as described below exactly! (refer to the sample code screenshot below with function calls and definition examples and hints): 1. get_score() this should be a value returning function called by main() function, that accepts no arguments. this function asks the user to enter a test score, validates it (to be in the range 0-100), and returns the test score back to the main() function. this function is called 3 times to receive the 3 validated test scores (refer to line #s 17 and 27 - 33 in the below sample code screenshot for hints on how this function is called, input prompts are provided, and each test score could be validated and returned) 2. find_lowest() this should be a value returning function called by main function, that accepts three test score arguments. this function should determine and return back to the main function the lowest of the three test scores to drop (refer to line #s 22 and 35 - 38 in the below screenshot for on how this function is called and hints for finding lowest score) 3. calc_average() this should be a value returning function called by main function, that accepts four arguments - three test scores, and the lowest score. this function should find and return the average of the two highest test scores back to the main function (refer to line #s 40 - 43 in the below screenshot for hints) 4. find_grade() this should be a value returning function called by main function that accepts one average argument. this function should determine and return the corresponding letter grade (using if/elif/else logic) back to the main function (refer to line #s 45 - 50 in the below screenshot for hints) 5. display_results() this should be a void function called by main function that accepts three arguments - lowest test score dropped, the average of the two highest test scores (formatted up to 2 decimals), and the letter grade variable and displays them (refer to line #s 52 - 57 in the below sample code screenshot for hints and step 3b table above for sample output screenshots) make sure to include the following in your program as well: i. define appropriate/descriptive variables and constants (refer to line #s 8 – 11, 17, 2, & 28 in the page 3 of 4 page 3 of 4 below screenshot for examples) ii. have enough documentation for understandability of your program by including a comment block prior to each function describing in your own words the purpose of each function (refer to example programs listed in canvas modules) iii. have proper indentation and line spacing for readability of your program (refer to example programs listed in canvas modules) 6. after completing your program as instructed, make sure to run your program file to obtain the output/result as page 4 of 4 page 4 of 4 required (refer to the screenshots in the table above in step 3b for various inputs entered and output displayed) 7. you may now proceed to program assignment instructions and upload link within this module and follow the steps in the link or from steps below to submit your work as a text entry as well as file upload (an attached .py file): a. first, to submit your program as text entry, follow the steps below: • choose the submit assignment button (top right), • choose text entry tab, • copy/paste your python code from the program/script file to the text box, • choose submit assignment to complete the text entry submission. b. now, to submit your python code as a file upload, follow the steps below: • choose the re-submit assignment button (top right), • make sure file upload tab is selected this time, • choose browse to locate your program/script file to add (ch5lastfirst.py file), • choose submit assignment to complete program/script file upload. (ch5) program assignment instructions>