top of page

Scratch 1.0

20 nov. 2022
3 min de lecture

Dernière mise à jour : 27 nov. 2022

Scratch is a visual-based programming language that's child-friendly with a thriving community and a large playground. Scratch projects encourage children to explore programming early on. The block-like interface allows users to get experience forming commands and may pave the way for deeper interests in computer science later on.

The drag-and-drop programming style is an excellent, low-pressure introduction to the concept of building programs.




What will we learn in this course ?


This course is designed to help you get the most out of this programming language. You can get into Scratch on your own easily, but sometimes having step-by-step directions to building help jumpstart your learning. These programming concepts could pave the way for more significant projects down the road with other programming languages, so getting started is your first step.

what you'll learn :

1/ Getting started with scratch.

2/ Input and Output.

3/ Types of Data.

4/ Creating and using Variables.

5/ Concatenation.

6/ Basic maths and relational operators.

7/ If loop.

8/ Building our first game.


1 : Getting started with Scratch :

1-Signing up:

you need to sign up to have all your work saved online, you can log into any computer and access all your programs anytime anywhere.



2- Changing the name of your program :

To recognize later on , you need to name your programs.


3-page tour:

  • instructions:


  • middle section:


  • backpack:


  • stage area (sprites and background):


4-Exercise:

Make abby tell us about her self.




2-input and output:

  • what is Input an Output ?

I/O is the communication between an information and a processing system, such as a computer, and the outside world, possibly a human or another information processing system

  • What is an input ?

Inputs are the signals or data received by the system ( when we put information into the computer )

  • What is an output?

Outputs are the signals or data sent from it.(when we get something out of the computer )

--> A program is started with inputs and results outputs.

  • Exercise :

Abby will ask for a name , after typing , she will say ( hello+the name)



3-Types of Data :

There are different types of data :

  • Integer (int) : Numeric data type for numbers without fractions

  • Floating Point (float): Numeric data type for numbers with fractions

  • Character (char): Single letter, digit, punctuation mark, symbol, or blank space

  • String (str or text): Sequence of characters, digits, or symbols—always treated as text

  • Boolean (bool):True or false values

4-creating and using variables:

If we want to restore answeres to multiple questions, we need variables :

Variable: is a value that can change, depending on conditions or on information passed to the program.

Exercise :

Abby will ask for a name and favorite color, after typing , she will say (“ hello”+ name),(color+”is my favorite.”)




5-concatenation:

Concatenation is the operation of joining two strings together.




6-basic math and relational operators :

  • Basic operators :

( + ) : Plus

( - ) : Minus

( * ) : Multiply

( / ): Divided

  • Exercise :

We will be asked to provide two numbers ( number A and number B ) and the program will calculate.



  • Relational operators:

( = ) : Equal

( < ) : Less

( > ) : Greater than


7-using if loop and if/else loop :

The if statement tests a condition and then completes an action based on whether a result is true or false.

The if/else statement executes a block of code if a specified condition is true. If the condition is false, another block of code can be executed.

Exercise :

We are asked to type a number , if the number is above 50 say (“too high”) if it’s less than 50 say (“too low”)




8-building our first game

  • Requires : - input / output / relational operators / selection statements (if / if else) / random numbers

  • the game : get the computer to choose a random number , enter what number the computer is thinking of , if the guessed number is right (output : “right “) , if higher (output : “too high“) if lower(output:”too low”)


Commentaires


bottom of page