{"id":1417,"date":"2016-10-27T12:44:54","date_gmt":"2016-10-27T12:44:54","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/?p=1417"},"modified":"2016-10-27T12:44:54","modified_gmt":"2016-10-27T12:44:54","slug":"nat-5-our-first-program","status":"publish","type":"post","link":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/2016\/10\/27\/nat-5-our-first-program\/","title":{"rendered":"Nat 5 &#8211; Our first program"},"content":{"rendered":"<p>Today in class we used <a href=\"http:\/\/trace.dcs.gla.ac.uk\/tracs-imperative-code\/\">TRACS<\/a> to look at the program from <a href=\"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/2016\/10\/25\/n5-python-introduction\/\">last time<\/a>, so we could better understand how it works and how the Python <a href=\"http:\/\/www.bbc.co.uk\/education\/guides\/zthbgk7\/revision\/7\">translator<\/a> works.<\/p>\n<ul>\n<li>A compiler changes all the source code (python) to machine (object) code. The machine code is then executed after all lines have been complied.<\/li>\n<li>An interpreter changes one line of source (Python) code to Machine (object) code, this is then executed immediately.<\/li>\n<\/ul>\n<p>The class was then set a new program to create.<\/p>\n<h3>Task<\/h3>\n<p>Write a program that takes in 3\u00a0numbers, calculates the total, then works out the change from a given amount.<\/p>\n<h3>Test data<\/h3>\n<p>2.99, 1.50, 3.00<br \/>\n10.00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today in class we used TRACS to look at the program from last time, so we could better understand how it works and how the Python translator works. A compiler changes all the source code (python) to machine (object) code. The machine code is then executed after all lines have been complied. An interpreter changes &hellip;<\/p>\n","protected":false},"author":32,"featured_media":1385,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17013],"tags":[],"class_list":["post-1417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-national-5"],"jetpack_featured_media_url":"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/ColtnessHS-ComputingScience\/uploads\/sites\/12638\/2016\/09\/Slide3.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/comments?post=1417"}],"version-history":[{"count":1,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1417\/revisions"}],"predecessor-version":[{"id":1418,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1417\/revisions\/1418"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media\/1385"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media?parent=1417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/categories?post=1417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/tags?post=1417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}