{"id":428,"date":"2023-02-15T11:36:31","date_gmt":"2023-02-15T11:36:31","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/?page_id=428"},"modified":"2023-02-15T11:40:29","modified_gmt":"2023-02-15T11:40:29","slug":"challenge-7","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/software-design-and-development\/week-3\/challenge-7\/","title":{"rendered":"Challenge 7"},"content":{"rendered":"\n<p>Open your previous challenge program where you tested exam results based on a user input.<\/p>\n\n\n\n<p>Save a new version of the file and alter it so that you pass the value that the user enters into a function.<\/p>\n\n\n\n<p>This function checks that it is a number between 0 and 100 inclusive and returns True if it is and False if it isn\u2019t. The function should tell the user when it isn\u2019t a valid number.<\/p>\n\n\n\n<p>Add a loop so the program keeps asking the user to enter a number until they enter a valid one.<\/p>\n\n\n\n<p>Change the response part of the program into a procedure that takes the exam result and prints the output string based on the value. You can now remove the checks from the is\/elif\/else block that warn for invalid numbers as they are covered in the first function.<\/p>\n\n\n\n<p class=\"nextlink\"><a href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/software-design-and-development\/week-3\/classes\/\" data-type=\"page\" data-id=\"434\">Next: Classes<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Open your previous challenge program where you tested exam results based on a user input. Save a new version of the file and alter it so that you pass the value that the user enters into a function. This function checks that it is a number between 0 and 100 inclusive and returns True if&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/software-design-and-development\/week-3\/challenge-7\/\">Continue reading <span class=\"screen-reader-text\">Challenge 7<\/span><\/a><\/p>\n","protected":false},"author":5710,"featured_media":0,"parent":18,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-428","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/users\/5710"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/comments?post=428"}],"version-history":[{"count":4,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/428\/revisions"}],"predecessor-version":[{"id":436,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/428\/revisions\/436"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/18"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/media?parent=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}