{"id":47,"date":"2023-04-12T17:14:19","date_gmt":"2023-04-12T16:14:19","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/?page_id=47"},"modified":"2023-04-19T15:48:47","modified_gmt":"2023-04-19T14:48:47","slug":"program-1","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/program-1\/","title":{"rendered":"Program 1: Hello World"},"content":{"rendered":"\n<p>The most basic program is known as &#8216;Hello World&#8217;. The program simply outputs the phrase &#8220;Hello World&#8221; to an output device &#8211; often the display.<\/p>\n\n\n\n<p>You can see the code and output below, or you can access it on repl.it by <a href=\"https:\/\/replit.com\/@MrWilsonDFSA\/Hello-World#main.py\" target=\"_blank\" rel=\"noreferrer noopener\">clicking here.<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Code<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"44\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/insidem11\/uploads\/sites\/10357\/2023\/04\/19144807\/image-6.png\" alt=\"\" class=\"wp-image-128\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/insidem11\/uploads\/sites\/10357\/2023\/04\/19144807\/image-6.png 748w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/insidem11\/uploads\/sites\/10357\/2023\/04\/19144807\/image-6-300x18.png 300w\" sizes=\"auto, (max-width: 748px) 100vw, 748px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Output<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"908\" height=\"51\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/insidem11\/uploads\/sites\/10357\/2023\/04\/16080922\/image-1.png\" alt=\"\" class=\"wp-image-109\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/insidem11\/uploads\/sites\/10357\/2023\/04\/16080922\/image-1.png 908w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/insidem11\/uploads\/sites\/10357\/2023\/04\/16080922\/image-1-300x17.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/insidem11\/uploads\/sites\/10357\/2023\/04\/16080922\/image-1-768x43.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/insidem11\/uploads\/sites\/10357\/2023\/04\/16080922\/image-1-800x45.png 800w\" sizes=\"auto, (max-width: 908px) 100vw, 908px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">New Constructs\/Concepts<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Outputting<\/h4>\n\n\n\n<p>This program introduces the concept of outputting to the display using the print command. In this case, we give the print command a specific phrase to output: &#8220;Hello World&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Construct<\/th><th>Line(s)<\/th><th>Python Syntax<\/th><th>Purpose<\/th><\/tr><\/thead><tbody><tr><td>Outputting\/Sending to Display<\/td><td>2<\/td><td>print()<\/td><td>To display something on the monitor<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Parsons Problem<\/h2>\n\n\n\n<p>Drag and drop the following lines of code to display the lyrics of Twinkle Twinkle.<\/p>\n\n\n\n<div class=\"h5p-content\" data-content-id=\"3\"><\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button has-custom-width wp-block-button__width-100\"><a class=\"wp-block-button__link\" href=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/introduction-to-programming\/\">Previous: Introduction<\/a><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button has-custom-width wp-block-button__width-100\"><a class=\"wp-block-button__link\" href=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/program-2-introduce-yourself\/\">Next: Program 2<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The most basic program is known as &#8216;Hello World&#8217;. The program simply outputs the phrase &#8220;Hello World&#8221; to an output device &#8211; often the display. You can see the code and output below, or you can access it on repl.it by clicking here. Code Output New Constructs\/Concepts Outputting This program introduces the concept of outputting&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/program-1\/\">Continue reading <span class=\"screen-reader-text\">Program 1: Hello World<\/span><\/a><\/p>\n","protected":false},"author":73977,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-47","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/wp-json\/wp\/v2\/pages\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/wp-json\/wp\/v2\/users\/73977"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":38,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/wp-json\/wp\/v2\/pages\/47\/revisions"}],"predecessor-version":[{"id":241,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/wp-json\/wp\/v2\/pages\/47\/revisions\/241"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/insidem11\/wp-json\/wp\/v2\/media?parent=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}