Want to create interactive content? It’s easy in Genially!
Python con Makecode Arcade
IGNITE Serious Play
Created on March 11, 2024
Start designing with a free template
Discover more than 1500 professional designs like these:
Transcript
FIRST STEPS IN PYTHON
WITH MAKECODE ARCADE
START
INDEX
CHOOSE YOUR CHALLENGE
Hello world!
01.
02.
Crunching numbers
03.
Section Break
04.
Datos relevantes
05.
Timeline
THE ROADSO FAR...
In the previous units, you...
In the previous projects, you used a block-based programming language to create games that involved:
- Variables
- Loops
- Conditionals
WHAT NOW?
Starting from today, you will use a text-based programming language (Python) to build on these concepts and extend them.
In the previous units, you...
Python games
Using python to make a videogame
To execute a Python game, you need a Python interpreter. This is a program that translates and executes your Python program.
+info
SYNTAX
Programs written in a programming language must follow its syntax.
RULES THAT PRESIDE THEARRANGEMET OF WORDS IN A SENTENCE
Programs with syntax errors cannot be translated and executed.
Speech or text in a language must follow its syntax.
All programming languages have rules for syntax, i.e. how statements can be assembled.
+INFO
SYNTAX
Text vs blocks
- In Python, you can (and you will) make syntax errors. You will need to follow the syntax rules.
- Syntax errors can be frustrating when you start learning a text-based programming language.
- In block-based coding , syntax errors are not possible: rules are enforced by the blocks and the way they fit together.
- You can still make logical errors ! That’s when your program doesn’t work the way it should.
+INFO
You may be asking...
Then why do we usetext-based programming?
Because the things that you can express are infinite, and there are only so many blocks.
FIRST STEPS IN PYTHON
tASK 1: "HELLO WORLD"
Create a new project in Makecode Arcade
Type your first line of code
Reflect on this
Every time you learn a new programming language, it’s a tradition to get your first program to say “hello world”.
FIRST STEPS IN PYTHON
TASK 2: greet the user by name
Declare the variable "user"
Modify your program to show the variable
Reflect on this
Declare a variable that stores the user's name and display it on the screen.
FIRST STEPS IN PYTHON
TASK 3: greet the user by name and show their lucky number
Declare a variable named "number"
Extend the existing program from the previous task by typing in two similar additional statements.
Show the lucky number in a new splash!
Try this
FIRST STEPS IN PYTHON
GET TO KNOW THE DATA TYPES
user is a variable. It is assigned a string value.
A string is a data type used to represent text and is composed of a sequence of characters enclosed within single quotes (' ') or double quotes (" ").
a,b,c
An integer, refers to a data type used to represent whole numbers (positive, negative, or zero) without any decimal or fractional parts.
1,2,3
number is another variable. It is assigned an integer value.
It's quizz time!
El contenido visual es un lenguaje transversal, universal, como la música. Somos capaces de entender imágenes de hace millones de años, incluso deotras culturas.
+INFO
WELL DONE
YOU FINISHED THE FIRST LESSON
TWO QUICK QUESTIONS
20xx
[subtítulo 0X]
Puedes describir brevemente en qué consiste la línea temporal de tu presentación y exponer los hitos alcanzados oralmente para que nadie se duerma.
20xx
20xx
+ INFO
20xx
Name it "Hello world!" and choose "Python only" as Code options.
Is there a Python interpreter in Makecode Arcade?
Yes, you can access to it by pressing the "Python" tab.
ORDER MATTERS
Humans can infer meaning even in cases when syntax rules are violated.For example, if you say: instead of: another human will understand. But a computer WON'T.
“tonight see you”
“see you tonight”
Make sure you:
Type this line in your program:
- Spell "game.spalsh" correctly Python is case-sensitive: using capitals makes a difference.
- Used (opening and closing) round brackets around the message to be displayed.
- Used (single or double) quotation marks around the message to be displayed.
Function
Message
Namespace/categorie
THIS
IS THE SAME AS THIS
THIS
IS THE SAME AS THIS
MODIFY THE VALUEOF EACH VARIABLE DO YOU SEE ANY DIFFERENCE?
Add this line in to your program:
Make sure you:
Name of the variable
- Type it in a new line.
- Use (single or double) quotation marks around the value of the variable.
Value of the variable
Make sure you:
Type this line in your program:
- Spell "game.splash" correctly Python is case-sensitive: using capitals makes a difference.
- Used (opening and closing) round brackets around the message to be displayed.
- Used (single or double) quotation marks around the message to be displayed.
Function
Message
Namespace/categorie
Make sure you:
Add this line in to your program:
- Type it in the first line of the program.
- Use (single or double) quotation marks around the value of the variable.
- Leave a line between the variable declaration and the "game.splash" function.
Value of the variable
Name of the variable
THIS WILL HAPPENTO YOU VERY OFTEN
Don’t be overwhelmed by these errors.They are here to discourage the faint-hearted.You can fix them!
Add the name of the variable
Add a comma to the end of the message
Add this line in to your program:
Make sure you:
Name of the variable
- Type it in a new line.
- Use (single or double) quotation marks around the value of the variable.
Value of the variable
Add this line in to your program:
Make sure you:
Name of the variable
- Type it in a new line.
- Use (single or double) quotation marks around the value of the variable.
Value of the variable
Subtítulo
Para contar historias de forma ordenada, jerárquica, estructurada y concisa. Estos son los cuatro pilares para llevar a cabo una presentación exitosa.
Definir mensajes secundarios con interactividad.
Medir los resultados.
Jerarquizarla y darle peso visual a lo principal.
Establecer un flujo a través del contenido.