{"id":9184,"date":"2017-09-25T15:47:16","date_gmt":"2017-09-25T13:47:16","guid":{"rendered":"http:\/\/agora.xtec.cat\/esc-cancoll\/?page_id=9184"},"modified":"2019-02-19T15:16:24","modified_gmt":"2019-02-19T14:16:24","slug":"session-9","status":"publish","type":"page","link":"https:\/\/agora.xtec.cat\/esc-cancoll\/curs-scratch-primaria\/module-1-lets-start-the-scratchs-adventure\/session-9\/","title":{"rendered":"Session 9:"},"content":{"rendered":"<h2>Working Plan<\/h2>\n<div style=\"padding-left: 50px;\">\n<ul>\n<li>Conditional structure<\/li>\n<li>Logical expressions<\/li>\n<li>Operators and sensing<\/li>\n<li>Questions and answers<\/li>\n<\/ul>\n<\/div>\n<hr \/>\n<h2>Let&#8217;s condition de movements<\/h2>\n<p><img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-icona_tasques.png\" alt=\"Pas a pas\" width=\"32\" \/>\u00a0<strong>Step by step<\/strong><\/p>\n<div style=\"padding-left: 50px;\">\n<ul>\n<li>Sign in and <strong>open the project m1repte71 that we created in session 7<\/strong>.<\/li>\n<li>Click on\u00a0<strong>File<\/strong>\u00a0and choose the option <strong>Save as a copy<\/strong>.<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-menufitxer_desaunacopia.png\" alt=\"Men\u00fa fitxer\" \/><\/li>\n<li>Now we have a project called\u00a0<strong>m1repte71copy<\/strong>. Change the name to <strong>m1<\/strong><strong>repte91.<\/strong><\/li>\n<li>Now, change the size of the dragon bigger.<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-programa_drac_creix1.png\" alt=\"Drac creix\" \/><\/li>\n<li>We have checked the category\u00a0<strong>Control<\/strong>. Now let&#8217;s have a look at the <strong>conditional structures<\/strong>:<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-control.png\" alt=\"Estructures condicionals\" \/><\/li>\n<li>Add a condition. You can use the block<strong>\u00a0if\u00a0&#8230; then<\/strong>:<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-control_sillavors.png\" alt=\"Si ... llavors\" \/><\/li>\n<li>The blocks with pointed ends are <strong>logical expressions<\/strong>, which can be true or false. We can find them in the categories <strong>Operators<\/strong> and <strong>Sensing<\/strong>.<\/li>\n<li>We will add the dragon an initial control to <strong>set size at\u00a0100%<\/strong>\u00a0and add a condition to stop growing when touching the wizard:<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-programa_drac_creix2.png\" alt=\"Drac creix amb l\u00edmit\" \/><\/li>\n<\/ul>\n<\/div>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-icona_repte.png\" alt=\"Icona repte\" width=\"32\" \/>\u00a0<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-repte1.png\" alt=\"Repte 1\" width=\"100\" \/><\/p>\n<p>Modify the project\u00a0<strong>m1<\/strong><strong>repte91<\/strong>\u00a0to make the dragon stop growing if he touches de wizard or if we press a key.<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-operadors_expressiologicaoexpressiologica.png\" alt=\"Expressi\u00f3 l\u00f2gica o expressi\u00f3 l\u00f2gica\" \/><\/p>\n<hr \/>\n<h2>The Scratch asks questions!<\/h2>\n<p><img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-icona_tasques.png\" alt=\"Pas a pas\" width=\"32\" \/>\u00a0<strong>Step by step<\/strong><\/p>\n<div style=\"padding-left: 50px;\">\n<ul>\n<li>let&#8217;s go on working on the projetc\u00a0<strong>m1<\/strong><strong>repte91<\/strong><\/li>\n<li>In the category\u00a0<strong>Control<\/strong>\u00a0there is another conditional block:<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-control_sillavorssino.png\" alt=\"Si ... llavors ... si no ...\" \/><\/li>\n<li>Choose the wizard. He will ask a question. Modify the programme and add the following:<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-sensors_preguntaespera.png\" alt=\"Pregunta i espera\" \/><\/li>\n<li>Write the following in this block: &#8220;Do you give up?\u00a0Say\u00a0Y\u00a0if it is Yes and\u00a0\u00a0N if it is No&#8221;.<\/li>\n<li>When we write the answer it is saved in a place called <strong>answer<\/strong>:<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-sensors_resposta.png\" alt=\"Resposta\" \/><\/li>\n<li>In order to pregramme the two possible answers, we must do the following:<br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-compara_respostasi.png\" alt=\"Comparaci\u00f3\" \/><br \/>\n<img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/projectes.xtec.cat\/programacioirobotica\/wp-content\/uploads\/usu604\/2017\/06\/scratch-programa_respostasi.png\" alt=\"Programa condicional amb si ... si no\" \/><\/li>\n<\/ul>\n<\/div>\n<hr \/>\n<p>&nbsp;<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working Plan<\/p>\n<ul>\n<li>Conditional structure<\/li>\n<li>Logical expressions<\/li>\n<li>Operators and sensing<\/li>\n<li>Questions and answers<\/li>\n<\/ul>\n<p>Let&#8217;s condition de movements<br \/>\n\u00a0Step by step<\/p>\n<ul>\n<li>Sign in and open the project m1repte71 that we created in session 7.<\/li>\n<li>Click on\u00a0File\u00a0and choose the option Save as a copy.\n<\/li>\n<li>Now we have a project called\u00a0m1repte71copy. Change the name to m1repte91.<\/li>\n<li>Now, change the&hellip;  <a href=\"https:\/\/agora.xtec.cat\/esc-cancoll\/curs-scratch-primaria\/module-1-lets-start-the-scratchs-adventure\/session-9\/\" title=\"Read Session 9:\">Llegeix m\u00e9s\u00bb<\/a><br \/>\n","protected":false},"author":1,"featured_media":0,"parent":9144,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-9184","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/agora.xtec.cat\/esc-cancoll\/wp-json\/wp\/v2\/pages\/9184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agora.xtec.cat\/esc-cancoll\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/agora.xtec.cat\/esc-cancoll\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/agora.xtec.cat\/esc-cancoll\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agora.xtec.cat\/esc-cancoll\/wp-json\/wp\/v2\/comments?post=9184"}],"version-history":[{"count":3,"href":"https:\/\/agora.xtec.cat\/esc-cancoll\/wp-json\/wp\/v2\/pages\/9184\/revisions"}],"predecessor-version":[{"id":9566,"href":"https:\/\/agora.xtec.cat\/esc-cancoll\/wp-json\/wp\/v2\/pages\/9184\/revisions\/9566"}],"up":[{"embeddable":true,"href":"https:\/\/agora.xtec.cat\/esc-cancoll\/wp-json\/wp\/v2\/pages\/9144"}],"wp:attachment":[{"href":"https:\/\/agora.xtec.cat\/esc-cancoll\/wp-json\/wp\/v2\/media?parent=9184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}