{"id":1513,"date":"2018-02-04T07:44:53","date_gmt":"2018-02-04T07:44:53","guid":{"rendered":"http:\/\/education.dennis.net.au\/wordpress\/?p=1513"},"modified":"2018-06-24T10:33:21","modified_gmt":"2018-06-24T10:33:21","slug":"1513","status":"publish","type":"post","link":"http:\/\/education.dennis.net.au\/wordpress\/?p=1513","title":{"rendered":"Week 2 &#8211; Term 1 2018"},"content":{"rendered":"<body><p><b>Learning Objective:<\/b> to understand data types and data structures used in programming.<\/p>\n<p><b>Theory:<\/b><\/p>\n<p>We\u2019ll be covering some basic programming theory to link up with what we looked at last year in transition.<\/p>\n<p><b>Programming:<\/b><\/p>\n<ol>\n<li><strong>Programming Task 1:<\/strong> Write the following <strong>functions <\/strong>in Python, saved to a file called calculator.py<br>\n\u2013 fnAddNumbers(numFirst, numSecond)<br>\n\u2013 fnSubtractNumbers(numFirst, numSecond)<br>\n\u2013 fnMultiplyNumbers(numFirst, numSecond)<br>\n\u2013 fnDivideNumbers(numFirst, numSecond)<br>\nTo test your code, copy the calculatorTest.py file from the Resources folder in Compass (under \u2018Programming Samples\u2019) into the SAME folder as your program. Open it in IDLE and execute the code. Do not use raw_input() or ask a user to input numbers.<\/li>\n<li><strong>Programming Task 2:<\/strong> Write a program that works like a calculator \u2013 a user is asked for two numbers, and then chooses: add, subtract, multiply, divide. The program should return the correct values, using your functions from the last task. Its interface, while text, should be consistent and easy to use.<\/li>\n<li><strong>Programming Task 3 (Optional):<\/strong> Expand your program to include other mathematical calculations, such as square root, exponential functions, trigonometric functions, etc.<\/li>\n<\/ol>\n<p><b>Homework:<\/b><br>\n<i>Theory<\/i>: Finish the Context Questions given out in class (Chapter 1, Q1-4) <b>Due:<\/b> Monday, 12th Feb.<br>\n<i>Theory:<\/i> Complete questions 1-9 from Chapter 6 of your textbook (Page 77). <b>Due:<\/b> Monday, 12th Feb.<br>\n<i>Programming:<\/i> Complete the programming tasks 1 &amp; 2 listed above. You are encouraged to also complete Task 3.\u00a0<b>Due:<\/b> Wednesday, 14th Feb.<\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>Learning Objective: to understand data types and data structures used in programming. Theory: We\u2019ll be covering some basic programming theory to link up with what we looked at last year in transition. Programming: Programming Task 1: Write the following functions in Python, saved to a file called calculator.py \u2013 fnAddNumbers(numFirst, numSecond) \u2013 fnSubtractNumbers(numFirst, numSecond) \u2013 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/education.dennis.net.au\/wordpress\/?p=1513\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Week 2 &#8211; Term 1 2018&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1513","post","type-post","status-publish","format-standard","hentry","category-curriculum"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1513"}],"collection":[{"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1513"}],"version-history":[{"count":4,"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1513\/revisions"}],"predecessor-version":[{"id":1518,"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1513\/revisions\/1518"}],"wp:attachment":[{"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1513"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/education.dennis.net.au\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}