{"id":854,"date":"2014-05-06T18:10:23","date_gmt":"2014-05-06T18:10:23","guid":{"rendered":"http:\/\/blogs.evergreen.edu\/candc14\/?page_id=854"},"modified":"2017-02-14T15:58:30","modified_gmt":"2017-02-14T23:58:30","slug":"write-code-competency-practice-problem","status":"publish","type":"page","link":"https:\/\/sites.evergreen.edu\/compcog17\/communications-2\/forums\/classes\/week-5-may-3\/write-code-competency-practice-problem\/","title":{"rendered":"Write Code Competency Practice Problem"},"content":{"rendered":"<h1><\/h1>\n<h1>Write Code Example 1 ENGLISH<\/h1>\n<div>\n<h2>Problem:<\/h2>\n<p>Write a program to get test scores from the user until a 0 test score is entered. For each test, tell if it is below 50. \u00a0After you finish getting all the scores, print out the average of all the even scores, the highest odd score, and the number of scores in the 80s.<\/p>\n<p>SOLUTION:<\/p>\n<h3>get a test score<br \/>\nwhile there are still tests left<br \/>\n&#8212;-if it is below 50<br \/>\n&#8212;&#8212;&#8211;tell the user it is below 50<br \/>\n&#8212;-if this score is even<br \/>\n&#8212;&#8212;&#8212;add this test score to the total for even test scores<br \/>\n&#8212;&#8212;&#8212;add 1 to the count of even scores<br \/>\n&#8212;&#8211;if this score is odd<br \/>\n&#8212;&#8212;&#8212;-if this is the highest odd score so far<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;change the high odd score to this score<br \/>\n&#8212;&#8211;if this score is greater that 79 and less than 90<br \/>\n&#8212;&#8212;&#8212;&#8212;-add 1 to the count for scores in the 80s<\/h3>\n<h3>&#8212;&#8211;get the next score<\/h3>\n<h3>print the total of even scores divided by the count of even scores<br \/>\nprint the highest odd score<br \/>\nprint the count of scores in the 80s<\/h3>\n<\/div>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/academic.evergreen.edu\/v\/vanetta\/WriteCodeExample1Run.html\">See the actual program run and the JavaScript source here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Write Code Example 1 ENGLISH Problem: Write a program to get test scores from the user until a 0 test score is entered. For each test, tell if it is below 50. \u00a0After you finish getting all the scores, print out the average of all the even scores, the highest odd score, and the number [&hellip;]<\/p>\n","protected":false},"author":274,"featured_media":0,"parent":623,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_mi_skip_tracking":false},"_links":{"self":[{"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/pages\/854"}],"collection":[{"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/users\/274"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/comments?post=854"}],"version-history":[{"count":0,"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/pages\/854\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/pages\/623"}],"wp:attachment":[{"href":"https:\/\/sites.evergreen.edu\/compcog17\/wp-json\/wp\/v2\/media?parent=854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}