{"id":14,"date":"2023-02-02T11:33:48","date_gmt":"2023-02-02T11:33:48","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/?page_id=14"},"modified":"2023-03-07T10:47:41","modified_gmt":"2023-03-07T10:47:41","slug":"week-1","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/software-design-and-development\/week-1\/","title":{"rendered":"Week 1"},"content":{"rendered":"\n<p>In this week you will learn: the outcomes of the unit, what are variables and operators, the print function, conditional statements, and how to begin representing this in a flowchart design.<\/p>\n\n\n\n<p>First check that your software can run python. If you are using Python IDLE or Replit you can use the following guide:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"957\" height=\"222\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/09160603\/helloworld.png\" alt=\"Hello world printed in the Python IDLE console\" class=\"wp-image-228\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/09160603\/helloworld.png 957w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/09160603\/helloworld-300x70.png 300w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/09160603\/helloworld-768x178.png 768w\" sizes=\"auto, (max-width: 957px) 100vw, 957px\" \/><\/figure>\n\n\n\n<p>Open Python IDLE. After the &gt;&gt;&gt; type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print(\"Hello world\")<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"138\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/09160609\/helloworldalt-1024x138.png\" alt=\"Hello world printed in the Replit console\" class=\"wp-image-229\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/09160609\/helloworldalt-1024x138.png 1024w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/09160609\/helloworldalt-300x40.png 300w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/09160609\/helloworldalt-768x104.png 768w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/09160609\/helloworldalt.png 1260w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In a new Python repl, click in the black window to the right and after the &gt; type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print(\"Hello world\")<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>When you press return you should see the text below printed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Hello world<\/code><\/pre>\n\n\n\n<p>If you are using another program and cannot figure out how to make it work, or if you cannot get Hello world to print in IDLE or Replit,  then contact your tutor for guidance.<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>The command that you ran above was done in what is called the console. In this course we will write a whole file of code and then run it, rather than one line at a time like you do in the console. To write and run a file you would do the following:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>In IDLE, click &#8220;File&#8221; then &#8220;New File&#8221; which will launch a new window where you type your code. You save that file using &#8220;File&#8221; then &#8220;Save&#8221;, and then run it with &#8220;Run&#8221; then &#8220;Run module&#8221;. The output appears in the console window.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>In Replit you type your code into the middle white box between the file list and the console.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"202\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/15162048\/repl-1024x202.png\" alt=\"An arrow showing where you type the code in replit\" class=\"wp-image-469\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/15162048\/repl-1024x202.png 1024w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/15162048\/repl-300x59.png 300w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/15162048\/repl-768x151.png 768w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/15162048\/repl.png 1260w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>Then run it clicking the green Run button. The output appears in the black console area.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"nextlink\"><a href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/software-design-and-development\/week-1\/outcomes\/\" data-type=\"page\" data-id=\"212\">Next: Outcomes<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this week you will learn: the outcomes of the unit, what are variables and operators, the print function, conditional statements, and how to begin representing this in a flowchart design. First check that your software can run python. If you are using Python IDLE or Replit you can use the following guide: Open Python&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/software-design-and-development\/week-1\/\">Continue reading <span class=\"screen-reader-text\">Week 1<\/span><\/a><\/p>\n","protected":false},"author":5710,"featured_media":0,"parent":12,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-14","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/14","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=14"}],"version-history":[{"count":8,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/14\/revisions"}],"predecessor-version":[{"id":709,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/14\/revisions\/709"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/12"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/media?parent=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}