Professional Documents
Culture Documents
Computational Thinking Week 7
Computational Thinking Week 7
UNEM
Computational Thinking I
Unit 3
Technological tools for algorithm design
Topic 2
Program Coding and Compilation
UNEM
I
Aim
Develop practical skills that allow structuring logical thinking and enhancing students'
digital creativity by allowing them to design their own graphic programs.
Introduction
❑ Program coding and compilation is the key process in software development, where ideas are transformed into
executable code.
❑ By writing instructions in a programming language, ideas are translated into algorithms and digital solutions are
created.
❑ Compilation converts the source code into an executable program, optimizing its performance and guaranteeing
its correct functionality.
❑ Mastering these concepts is essential to materialize your ideas and build powerful computer applications.
UNEM
I
Subtopics
» Subtopics:
1 .- Image library.
2 .- Conditional structures: “Yes, then”
3 .- Loops and animations.
4 .- Tickets and events.
UNEM
SUBTEMA 1.- Image library
I
https://leer.es/wp-content/uploads/2021/06/g
uia_didactica_actualizacion_scratch3_0.pdf UNEM
I
In the library a menu is presented with the UNEM
classifications of different types of images
D Scratch 3.29.1 I
UNEM
How to add a background? I
UNEM
Click on scenario to display the
different options, such as: Choose
I
a background, create a
background, choose a random
background, or upload an external
image
UNEM
In the library there is a menu with the classifications of different types of funds.
Scratch 3.29.1 I
►
UNEM
Costumes I
Space that allows images to be added, which are associated with the
object. There are different options and tools to do it.
UNEM
In the paint option there is a space to create or edit an object I
Image management options UNEM
I
Scenery
B Upload
costume
Allows you to upload an image previously stored in jgp or png format
Choose a
Allows you to select an image from the Scratch library
costume
UNEM
SUBTEMA 2.- Conditional structures: “Yes, then”
I
They are instructions that allow a
Simple Conditional Algorithm
condition to be evaluated and
age
determine what task to execute if its
«t age>=18 b--
result is true.
You can specify the action to take when
Younger' Adult
the condition is false, however this is
not always required. If not specified, the
EndAlgorithm
program will skip said scenario.
Botello, D. (2017). Conditional structures – Programming.
[Figure 3]. Recovered from: http://yoaprendo-
informatica.blogspot.com/2017/04/estructura-de-conditionales.html
There are two types of conditional blocks in Scratch:
1) Specifies the condition ( if) and the action to take only in the true (then)
UNEM
scenario.
I
UNEM
2) The second block also allows determining the task to be performed if the
condition is false (else).
I
UNEM
Conditional structures: “If, then”
I
Nested expressions:
It is possible to configure conditional blocks one inside
another, to evaluate several conditions and specify
actions according to different scenarios.
It is important to remember that the execution is
sequential. For example, in the code shown if both keys
(A and B) are pressed at the same time, only the action
of key A will be executed, since the code will never enter
the scenario where this condition is false, and therefore
will not will evaluate to the B key. Pallo, D., Delgado, R. (2020). Module 4: Basic programming
with Scratch. [Figure 6]. Retrieved from:
https://roa.cedia.edu.ec/webapps/55
UNEM
Exercise 1: Conditional
I
Run a program that asks the age and
determines if it is an adult or a minor
Clicking
but
. next costume
UNEM
Exercise 3: Ballerina Dances
I
This exercise is posed as a challenge, practice the
animation of the following object, in the image
library you will find the dancer, she has four
costumes. Ballerina-a Ballerina-b
Click on the Costumes tab to view them. When
the show runs, she uses all of them to dance on
stage.
Ballerina- Ballerina-
c d
UNEM
Exercise 4: Object Party
I
Clicking
Ap
pe
an
ce
ar
Sound when pressing space
key
Events
when clicking on this object
Control
Events
when the background backg
changes to round
1
Sensors
Variables
my blocks
UNEM
Exercise 5: Question with Scratch I
Objects can use questions and answers using the light blue question and answer
blocks on the Sensors tab.
do you think it does? run it . ask What carreer do you I and wait
study?
1 EmMu
In the blue response block, the
Initial education information entered by keyboard is
stored
• Events are things that happen in programs to decide when pressing space key *
certain actions.
• For example, press keyboard keys and mouse when clicking on this object
buttons.
when background changes to
• The Event-type "header" blocks in the brown section background1 •