May 20, 2025

Week 31.b - Inputs and outputs, variables and assignments

CLASS OBJECTIVE

Interact with users by asking questions and reacting to their responses. 


QUESTIONS AND VARIABLES

You can ask users for information and either save it or not. Obviously you have to create variables before.

There is a difference between "saying" and "asking". When you use "Say" a message is shown. When you use "Ask" the algorithm waits for information.

Use "Set" to save the information into a variable.

     




ACTIVITY
Although you don't have to try the next Scratch program, analize it to make your own conclusions.




   



Link

May 19, 2025

Week 31.a - Objects and its algorithms

CLASS OBJECTIVE

Introduce the programming procedures for individual objects (sprite) and some of its main properties.


OBJECTS (sprites)

Using the lower-right panel you can add as many objects as you want, but each one of them have their indivudual properties, for example, position on the screen, size or orientation. Before you start creating algorithms you must be aware of these.


Some objects also have costumes, this is, a collection of alternate images to change the sprite appearance.



CODING EVENTS
Using events such as "click on sprite" or "press key", among others, you can change the appearance, position and size of any object. You can try with some of the next examples.

    



BROADCAST
By clicking an object you can send a message that can be received by others. This is used to activate more than one object algorithm at the same time.
In the next example, your can see 3 objects (and a different backdrop) programmed separately. When the buttons are clicked a message is sent and the boy object reacts when it recieves the message.


     






May 06, 2025

Week 32 - Project: Introduction and Planning

CLASS OBJECTIVE

Understand the final project we’ll be working on during this period. Analyze examples of interactive games created in Scratch that aim to solve real-life problems. Brainstorm and identify relevant challenges in our school environment to begin shaping your own game idea.

INTRODUCTION

This period, you'll be working on an exciting team project: creating a game in Scratch that helps solve a real problem from our school environment. The idea is to combine your creativity, programming skills, and teamwork to create something meaningful and useful.

Today’s session is all about exploring the project objectives, analyzing examples of games, and thinking about real problems we see at school.

ABOUT THE PROJECT

Objective:

The goal of this project is for you and your team to create a game or interactive story in Scratch that helps solve a real-life problem in your school environment. The problem can be anything that affects students or the school community—like learning math, using the keyboard properly, sorting trash correctly (plastic, organic, etc.), or any other issue you observe and think is important.

Stages:

The project will be developed over five weeks, each one focused on a different stage.
Today is Stage 1, where we will:

  • Learn about the project

  • Analyze examples

  • Choose the problem your team wants to solve

Deliverables:

Each session will have a specific task (or deliverable) that must be completed.
For today, your team will:

  1. Choose a problem that is present in your school environment.
  2. Write a hypothesis that describes the problem you chose
  3. Include a short justification explaining why the problem is important or relevant.
IMPORTANT: Most deliverables must be included in both:

  • Your team document (shared template provided by the teacher)

  • Each team member’s notebook

The teacher will let you know which deliverables are required in your notebook and which ones are not.

Team Document

Your teacher will provide a template that your team must use to collect and organize all the evidence and work from each stage of the project.


LETS SEE SOME EXAMPLES OF INTERACTIVE GAMES IN SCRATCH

Here are a few examples of Scratch games that aim to solve real-life problems:

You can explore these and other games on the Scratch website.
Remember: you can look at how these games are programmed, and if you find any game mechanics that could help in your own project, feel free to use or adapt them!

ACTIVITY

  1. Form your team based on the number of members your teacher assigns, and sit together.
  2. Discuss school problems you’ve noticed—things that make learning or daily life at school harder.

  3. Choose one problem your team wants to work on.

  4. Use the template provided by your teacher to write:

    • Problem to solve:
      • Write what issue or challenge you observed at school.
      • Example: First grade students don’t know how to do basic algebraic operations (addition, subtraction, multiplication, and division).
    • Hypothesis (What do you think causes the problem?):
      • We believe that… [who] + [what problem] + because… [possible cause]
      • Example: We believe that first grade students don’t know how to do basic algebraic operations because they don’t practice enough or the practice is not interactive.
    • Justification (Why is this important?):
      • Explain why this problem matters.
      • Example: Learning basic algebraic operations is the foundation for more advanced math skills and helps students develop logical thinking and problem-solving abilities.

✅ If your team finishes early and still has time, ask the teacher about Stage 2. You may be allowed to start working on the next part of the project.



April 28, 2025

Week 31 - Block programming with Scratch

CLASS OBJECTIVE

Introduce block-based programming by creating a Scratch account and exploring its key features, such as sprites, stages, events, controls, motion, sounds, appearances, and more.


INTRODUCTION

BLOCK-BASED PROGRAMMING

In this course you learned to program using different programming styles, like flowcharts (Raptor) and a didactic programming language (PseInt). Now you'll be introduced to block-based programming.

Block-based programming is a way of programming that uses visual blocks instead of writing code with text. These blocks fit together like puzzle pieces, making it easier to understand programming logic without needing to memorize syntax. It is very common in educational environments, such as Scratch, Blockly, or App Inventor, because it helps beginners (especially children and young people) learn the basic concepts of programming.

  • Sequences
  • Conditionals
  • Loops
  • Variables
  • Events

Each block represents an instruction or control structure, and by dragging and connecting them, the program is built.


Events

In block-based programming, an event is an action or situation that triggers or activates a block of code. In other words, the program starts executing certain instructions when that event occurs.


Control

These are the blocks that manage the flow of the program. They can easily be compared to traditional programming structures such as decision-making and loops, among others.


Stage and Objects

Programming in Scratch is often compared to animation, whether pre-programmed or interactive with a user. To achieve this, it is necessary to have a background (stage) and objects (sprite) that perform movements, change appearance, or play sounds.


Movement, Sounds, and Looks

These are essentially the actions that objects will perform when the conditions are met, or when the user decides.


Variables

As in any programming environment, the need to store data requires the use of variables, which are memory spaces labeled to store information related to the execution of a program.


Operators

Like variables, mathematical, text, and comparison operators are necessary for the execution of programs. With them, we can analyze and compare numerical information required for the execution of a program, even in a graphical environment.


SCRATCH ACCOUNT

Before you can star using Scratch, you have create an account in the next Web Address.

https://scratch.mit.edu/

Once in, follow the next steps:

  1. Click on the "Join Scratch" button.
  2. Create your user name using your student number, name and second name. 12345JosePerez
  3. Select México from the list.
  4. Add your birth month and year.
  5. Now your gender
  6. Write your school email address. a12345@idec.edu.mx
  7. Validate the process by opening your email account
Now, you're ready to start using Scratch. Use the CREATE menú to start programming.





Now, follow your teacher instructions to create your first program.


CLASS NOTES

As usual, write down the class title, the class objective, and answer the following questions:

  1. What are the differences between the Raptor, PseInt, and Scratch programming styles?
  2. Can you name at least three elements used in Raptor, PseInt, and Scratch?
  3. What is completely new to you in Scratch?

April 01, 2025

Week 28 - Selections and loops 2nd practice

CLASS OBJECTIVE

Reinforce the use of REPETIR and SI_ENTONCES commands by creating a new algorithm in PSeInt, but this time using a flowchart as a visual support. This new algorithm's purpose is to analyze a number to determine whether is a prime number or not.


INTRODUCTION

Today you're going to create a new algorithm to determine prime numbers. You already know the commands and the programming structures, except for the MOD operator, but you'll find it's a very easy mathematic operator related with division.


MOD OPERATOR

You're going to use a new operator, its name is MOD and the symbol that represent it is %

In this case, it doesn't mean "percentage", in this case means REMAINDER of a division.

For our practical purpouses, you must know that every time you get a remainder zero it means you found an exact divisor.

Try the next algorithm in PSeInt:


COMMENTS

This feature could be very helpful to remember how your PseInt algorithms work.  Add comments using double slashes.  

Everything you type after the slashes will be ignored by the interpreter, so you can add as many comments as you need.

// comentarios





ACTIVITY 1 

  • Start naming the algorithm, its name will be Números_primos, without spacesRemember the difference between the algorithm name and the file name, in which you can use spaces. 
  • For the file use the name Student name + números primos.
  • Now, you're going to use the next flowchart to create the algorithm in PSeInt. Remember you have to type commands and operators, or you can click on the left and right panels instead to insert then in the algorithm.




After you finish, press the "play" button to test it. Obviously it must tell you if a given number is prime or not.

Save the file and, before you turn it in,  press the "flowchart" button. Does it look like the image above?



CLASS NOTES

Write down in your notebook the title of the class, the objective and follow the instruction.

  • Write down the algorithm code from PSeInt in your notebook and explain, using your own words, what does every code line do, from the first until the last.

Show your answers to your teacher.

March 23, 2025

Week 27 - Selection and loops practice

CLASS OBJECTIVE

Reinforce the use of the SI ENTONCES and the REPETIR commands by creating algorithms by yourself, just knowing the final result of the program.


INTRODUCTION

Last class you learned the use of SI ENTONCES to create multiple paths in an algorithm. By the analysis of  variables content the procedure can change and produce different outcomes.

Today you'll create by your self a program to analyze a word's length, obviously using SI ENTONCES, and after this you'll adapt the program to be repeated until the user chooses to exit.

Remember, you won't get any help from your teacher.



ACTIVITY 1

Remember, the activity's purpose is that you create the algorithm all by yourself so, you'll receive a just a couple of guidelines.

  1. Name the algorithm LONGITUD_DE_TEXTO
  2. Declare a variable to save a word
  3. Ask the user for a word and save it into the variable
  4. Tell the user IF the word's length has more than 15 characters (tip: you'll also have to use LONGITUD() function)
    • Otherwise, tell the user the word is smaller than 15 characters.
Look at the examples:




ACTIVITY 2

Now you have to add a loop to your first algorithm to repeat over and over until the user decides to finish it.

  1. Declare another variable to save a text
  2. You'll have to add the REPETIR/HASTA QUE command to wrap the last procedure.
  3. Inside the loop you'll have to ask the user if he wants to "try with another word", receive his answer and save it to the new variable.
  4. The algorithm will continue until the user types some letter different to the "s" letter.

Look at the examples:


If you need one last resource to finish your algorithm, look at the next flowchart:





CLASS NOTES

Write down in your notebook the title of the class, the objective and follow the instruction.

  1. What kind of data type you choose to save the user's incoming words? why?
  2. What does the LONGITUD() function do?
  3. Nested IF is a programing resource to add more answers to a SI-ENTONCES instruction,  Would it be possible to create a Nested IF in PSeInt? How?
  4. How did you indicate the "different to" comparison symbol?

Show your answers to your teacher.

March 15, 2025

Week 26 - Selections and Loops using PSeInt

 CLASS OBJECTIVE

Create in PSeInt an algorithm that uses selections and loops (programming structures) by analyzing a flow chart that describes every step of process.


INTRODUCTION

Any programming language must have the selections and loops programming structures because ane procedure has to make decisions or to repeat procedures. Obviously PSeInt has this two resources among others. The name of this two command are: SI-ENTONCES and  REPETIR


 




SI-ENTONCES
I'm sure it'll be difficult to understand the "written" version of this commands, but I'm sure you'll get use to it. Look at the SI-ENTONCES examples:

In the flowchart it looks like:


Indentation 
As you can see, it's not as difficult as it looked. To keep it simple you must always use the indentation to show the inner step of the procedure on the right.



ACTIVITY 1
Now open PseInt and type the next algorithm. What does it do?





REPETIR

REPETIR is a command to create a loop, in other words, the repetition of a list of actions. In the next example, a message will be shown over and over until the variable div decreases until cero.


Now in a flowchart look:

Never forget to use the indentation to identify the procedures in the selections or in the loops structures.




ACTIVITY 2
Now open PseInt once again and type the next algorithm. What does it do? Have you done something like this before?


Upload the two files (SI_ENTONCES y REPETIR_HASTA QUE) to the Classroom post.



CLASS NOTES

Write down in your notebook the title of this class and the objective. Using Raptor symbols, draw the next flow charts.

  • Draw the flow chart for the Activity 1
  • Draw the flow chart for the Activity 2

Show your answers to your teacher.