MORE INFO THAN
YOUR SCHOOL ICT
BOOK
SKAHammad
[Course title]
2
≠ ≠ A=π r
Kolyom Computer
1-Aug-2024 The new version is coming soon!!
Author: Ahmed Abdelkarim
Description: Chapter 1 explains how to create simple code
in Python and blocks using different programs. It is for
beginners only, not expert programmers. Please tell your
IT/ICT teacher/admin if it is difficult.
“Chapter 1: Python & blocks using mblock (makeblock)
V5.4.0”
"BRAINSTORMING"
What does this code do??
from mblock import event
x=[Link]('What is the mark of the student?')
[Link](0, 0)
sprite.set_costume('costume2')
sprite.set_backdrop('backdrop2')
if x >=97.5:
[Link]('The student==Genius & intellegent')
print('The student==Genius & intellegent')
elif x >=95:
[Link]('The student==Excellent')
print('The student==Excellent')
elif x >=80:
[Link]('The student==Very good')
print('The student==Very good')
elif x >=65:
[Link]('The student==Good')
print('The student==Good')
elif x >=50:
[Link]('The student==Not good and not bad')
print('The student==Not good and not bad')
elif x >=35:
[Link]('The student==A little failing')
print('The student==A little failing')
elif x >=20:
[Link]('The student==The student failed')
print('The student==The student failed')
elif x >=5:
[Link]('The student==The student is really failed & do
not let him go to school again')
print('The student==The student is really failed & do not
let him go to school again')
elif x >=0:
[Link]('The student==The student is really idiotstupid
& do not let him go to school again')
print('The student==The student is really idiotstupid & do
not let him go to school again')
Lesson 1: Use conditionals to get the students' feedback.
(ENDED)
This code is to take the input from the user and to
Make the sprite and give the student's feedback.
This is how to make a list for beginners in Python!!
Names=['Ahmed','Mohamed','Amgad','Samar','Youssef','Ra
my']
print(Names[0:])
This is how to make a list of names in Python and print all
of its names.
Lesson 2: lists (ENDED)
"BRAINSTORMING"
Have you ever considered how to make a sprite? Use the
program make block V5.4.0 to say/ask us something.
Here, we use the phrase [Link]('question?')
In Python and in blocks, we use the following block:
This is how to take the input from the user by
programming languages blocks & python.
Lesson 3: inputs (ENDED)
"BRAINSTORMING"
What happens if………:
What happens if you click the button that turns on the
lights in your apartment?
Confused?? Let's say another example…………………………
What happens if you click the button that opens the
elevator?? It will open, is this true? Yes, we always see
these events in our daily lives. What does the word "event"
mean?
Let's start a new lesson!!
An event is something that happens and means in Arabic:
الحدث
Let's see how to make an event in makeblock V5.4.0!
1-Events in programming by blocks(mblock V5.4.0 in
Windows 7):
2-Events in programming by
Python:
We use the phrase from the mblock import event to get all
the events stored in makeblock, and we use the word
@[Link]
def on_greenflag(): to make makeblock do something when
greenflag
is clicked.
This is how to make events in makeblock using blocks &
python.
Lesson 4: Events (ENDED)
"BRAINSTORMING"
What does this code do?
num1=[Link]('What is num1?')
num2=[Link]('What is num2?')
result=num1+num2
[Link](result)
print(result)
This is another type of coding that uses input to add two
numbers.
CN (Essential note):
This code can be changed such as:
1-The number of digits can be changed.
2-The result can be changed by changing the sign from +
to -,/,*.
This is how to add, divide, subtract, and multiply using
inputs in Python.
Lesson 5: WRAPPING UP! Inputs (ENDED)
"BRAINSTORMING"
How to make a function in programming??
We use this phrase to make a function in Python:
This is how to make a function in programming (python)
using makeblock.
Lesson 6: functions (ENDED)
"BRAINSTORMING"
Do you know what this is?
This is a flowchart. What are the parts of a flowchart?
1-Terminator: It is the start/end of the flowchart.
2-Input/output:
3-Process:
4-Decision/Condition
These are the needed shapes to make a flowchart.
Lesson 7: Flowcharts (ENDED)
"BRAINSTORMING"
Do you know what artificial intelligence (AI) means?
AI is the way that the computer simulates human's
intelligence & AI has a lot of branches:
1-Machine learning that divides into two parts:
Supervised machine learning like Facebook
advertisements, Spam email filters & teachable machine:
[Link]
Supervised machine learning provides the electronic
machine with needed data to find the differences between
different (pictures/shapes) using the provided data by
human supervision.
2-Unsupervised machine learning:
Is to provide the electronic machine with some different
pictures/shapes to find the differences and divide them
into separate groups without any previous data about the
same groups available in its memory.
2- Deep learning.
CN: There are more branches of AI like the image below:
These are some of the artificial intelligence (AI) branches in
this lesson.
Lesson 8: AI & AI branches (ENDED)
"BRAINSTORMING"
Let's see some blocks & their names!!
Name: if-conditional
Name:if-else conditional
"BRAINSTORMING"
Do you know what is this makeblock block?
This is a forever loop.
The previous block is a forever loop that uses blocks to
repeat forever, is there any other type of block loops?
Yes…
like these blocks.
The repeat-until block repeats what is inside it until
something happens, and the repeat block repeats what is
inside it a definite number of times. We have finished the
block-based loops, let's see some Python loops!
CN:
Visual programming=
Programming using "BLOCKS"
Text-based programming=
Programming using "Python"
Python syntax: it is the way or the order of lines of code in
Python.
CN:
If you forgot the colon ":" in a loop, conditional, or a
function, forgot an indentation in a loop, conditional, or a
function, forgot the brackets "()" or the quotation marks in
a [Link], [Link], or a print phrase, makeblock
program will tell you that there's an error in your code, like
this in images:
These are some notes to make a successful code in python
as a beginner.
Lesson 9: Some notes to make a successful in Python as a
beginner (ENDED)
"BRAINSTORMING"
Is there any loops in Python?
Yes……………………………………
This is how to make loops using blocks and Python.
Lesson 10: Loops (ENDED)
"BRAINSTORMING"
Why didn’t we write in the 1st
and the 2nd image from the start of the 2nd line? Why did we
skip this small space?
This is known as “Python indentation”.This lets the
computer know that there is a function/loop in the code in
programming.
This is how to make Python indentation in programming by
using makeblock V5.4.0.
Lesson 11: Python indentation (ENDED)
"BRAINSTORMING"
Do you know what is a variable?
The variable is a box that can record a certain value, such
as a number, a code, a boolean, a letter, a word, or a
sentence.
"BRAINSTORMING"
Do you know what is a list?
The list is a bigger box that can record an infinite number
of values, such as numbers, codes, booleans, letters,
words, or sentences, and can be defined in makeblock
V5.4.0 by square brackets [] like this in the code below:
Names=['Ahmed','Mohamed','Amgad','Samar','Youssef','Ra
my']
print(Names[0:])
These are some information/data about variables and more
data (wrapping up) about lists.
Lesson 12: Variables and more data (wrapping up) about
lists (ENDED)
"BRAINSTORMING"
Do you know what does this code do?
This code is a new part of simple programming by Python
called "factorial". What does “factorial" mean?
The factorial is to multiply a number by the number less
than it until it reaches 1.
Confused?? Let's give some examples…
Factorial of 5=5*4*3*2*1=120
Factorial of 4=4*3*2*1=24
Factorial of 3=3*2*1=6
This is how to make a factorial for a number in Python
using makeblock V5.4.0
and in the daily life, too.
Lesson 13: Factorials (ENDED)
“BRAINSTORMING”
What are these blocks’ functions in this image?
1st: Move 10 steps: Is to move 10 positive moves (steps)
right (or to move 10 steps in positive x).
2nd: Turn right for several angles (degrees): like this
animated video link:
3rd: Turn left for several angles (degrees): like this
animated video link:
4th: Go to a wanted position (neither x nor y).
5th: Go to a customized position (x or y).
6th: Go to a (Glide to a) wanted position (neither x nor y).
7th: Go to a (Glide to a) customized position (x or y).
8th: Point in a customized direction (degrees).
9th: Point towards a wanted position (neither x nor y)
Learn,
Train,
Exercise,
Solve,
And
evaluate;to
succeed.
How to make a simple code in Python & blocks by
makeblock V5.4.0 By Ahmed Abdelkarim
Congratulations! You finished chapter 1 in my
programming book!
Name:………………………………………………
School:……………………………………………..
Class:……………………………………………….
Date of birth:……………………………………….
How old are you?......................................................
Makeblock V5.4.3 website version:
[Link]
Teachable machine website:
[Link]
Mblock earlier versions download:
[Link]
What is your feedback about chapter 1 in my book?
Chapter 2: Introduction to computers
Lesson 1: (Overview of Software)
Recap on Computer Software Concepts and Types:
From the lessons in the previous weeks, we know that
software refers to non-physical programs
and instructions that run on the computer hardware to
perform specific tasks or functions. It is the set
of codes and data that tell the computer what to do and
how to do it.
Examples of Software Types:
1-Operating System: This software runs the entire
computer, like the boss of everything.
2-Game Software: When you play a game on your
computer, there's special software just for that game.
3-Application Software: If you decide to learn
programming, you'll create your own software, like an app,
which will be another type of software on your computer.
So, your computer has different types of software, each
with its own job; whether it's running the computer, playing
games, or creating new programs.
Knowledge Check:
The answer is true
Lesson 1 (Overview of Software) :(ENDED)
Lesson 2 (Application Software):
Application Software: This is the most common type of
software. It is like a tool that does a particular job for a
person or even for another program.
Microsoft Office such as PowerPoint and Excel
Programs for editing pictures and videos
Web browsers such as Google Chrome and Internet
Explorer
Knowledge Check:
The answer is (“Application Software”)
Lesson 2 (Application Software): (ENDED)
Lesson 3.1 (System Software):
Purposes of System Software:
System Software:
System software is like the computer's boss, ensuring
all the programs and hardware work together. It has crucial
jobs:
1-Running Applications:
2-Coordinating Tasks:
3-Controlling the Computer:
Functions of Operating System:
Process Management
Memory Management
File System Management
Device Management
Security and Protection
Network Management
Account Management
Error Management
Co-ordination Between User Interface
Control Over System Performance
Process Management refers to the activities of managing
the work of multiple processes in an operating system. It
includes creating, scheduling, terminating processes, and
managing system parts such as CPU time, memory, and I/O
devices.
Error management refers to finding and fixing mistakes
in computer games. It uses special tools, like checking the
rules, watching how the game is played, and using clues
from error messages when something goes wrong. Like a
superhero team, error management helps ensure
computer programs work smoothly and without problems!
Memory Management refers to
controlling and managing a computer's main memory. It
ensures that blocks of memory space are located correctly
and wisely.
Account Management refers to gathering data to
determine who uses your system and what system
resources they use.
Lesson 3.1 (System Software): (ENDED)
Lesson 3.1 (Firmware):
Firmware is a special helper for smart devices. It's a
program installed in the device to help it work and
understand what to do. It's a bit like giving your gadgets
superpowers so they can do incredible things!
Smart hardware devices rely on firmware built into their
memory to function. Some examples of devices are:
Cameras
Mobile phones
Smart cars
Smart home appliances
Robotics
Lesson 3.2 (Firmware):(ENDED)
Lesson 4 (Driver Software)
What Is Driver Software?
Driver software is like a translator between the hardware
and the rest of the computer. It allows the hardware and
software to communicate. For example, a driver for the
mouse translates mouse movements into commands the
computer can understand. Without drivers, the hardware
couldn't connect and work with the rest of the computer
system.
Drivers are also needed for printers, keyboards, speakers,
and all other hardware. They ensure that everything can
"talk" to each other! The correct drivers must be installed
so all the hardware pieces work smoothly together.
What Does Driver Software Do?
It's like the captain of your computer team. Driver software
manages all the devices you plug into your computer, like
printers, headphones, or even special game controllers. It
helps these devices do their jobs properly. For example,
the driver for a printer makes sure it prints your documents
correctly. Whenever you connect something to your
computer, like a keyboard or a USB drive, you need a
driver for it to work properly.
Examples
When you buy something like a unique game controller,
the driver software comes with it to make the controller
work with your computer.
Even regular things like USB drives. It's like giving them
the instructions they need to do their jobs.
Knowledge Check:
The answer is true
1st Periodic test
Model (A)
Q1: Write (Yes) or (No) next to every sentence, with proof
and correction (5 marks, a mark for each point):
1-The most essential component of a computer is the
monitor. ( )
2-A server is like a supercomputer, capable of storing large
amounts of data. ( )
3-All computers come with the same operating system. (
)
4-Mainframe computers aren’t obsolete. They are being
used around the world. ( )
5-All memory types in a computer are the same, and they
serve a single purpose. ( )
Q2: Choose the correct answer for the choices between
braces (5 marks, a mark for each point):
1-Which of the following is an output device?
{Printer - Mouse – CPU – all answers are correct – no
answer is correct}
2- Which parts of the computer are used for typing?
{Monitor - Keyboard - Mouse – CPU – all answers are
correct – no answer is correct}
3- CPU is known as the {answer} of the computer.
{arms - eyes – brain – hand – all answers are correct – no
answer is correct}
4- The computer's physical parts that can be seen and
touched are called {answer}.
{software – hardware – input - output – all answers are
correct – no answer is correct}
5- An example of the computer’s software may be
{answer}.
{[Link] – [Link] – [Link] – all answers
are correct – no answer is correct}
Q3: Answer the following questions (5 marks, a mark for
each point):
1- What does CPU stand for?
2- What Does GPU stand for?
3- What does ALU stand for?
4- What does PSU stand for?
5- What does SDLC stand for?
“The end, best wishes”
1st Periodic test
Model (B)
Q1: Write (Yes) or (No) next to every sentence, with proof
and correction (5 marks, a mark for each point):
1-The most essential component of a computer is the CPU.
( )
2-A laptop is like a supercomputer, capable of storing large
amounts of data. ( )
3-All computers come with different operating systems. (
)
4-Mainframe computers are obsolete. They aren’t being
used around the world now. ( )
5-All memory types in a computer aren’t the same, and
they serve a lot of purposes. ( )
Q2: Choose the correct answer for the choices between
braces (5 marks, a mark for each point):
1-Which of the following is a part of the computer?
{Keyboard - Mouse – CPU – all answers are correct – no
answer is correct}
2- Which parts of the computer are used for pointing?
{Monitor - Keyboard - Mouse – CPU – all answers are
correct – no answer is correct}
3- CPU is known as the {answer} of the computer.
{arms - eyes – brain – hand – all answers are correct – no
answer is correct}
4- The computer's parts that can’t be seen or touched are
called {answer}.
{software – hardware – input - output – all answers are
correct – no answer is correct}
5- An example of the computer’s hardware may be
{answer}.
{[Link] – [Link] – mouse – all answers are
correct – no answer is correct}
Q3: Answer the following questions (5 marks, a mark for
each point):
1- What does CPU stand for?
2- What Does GPU stand for?
3- What does ALU stand for?
4- What does PSU stand for?
5- What does SDLC stand for?
“The end, best wishes”
Chapter 3: Introduction to block-based coding
Lesson 1: History of Block-Based Coding
Communicating With Computers
As programming continues to change the world, computers
are basically everywhere and in many things! Students like
you who learn to program are learning how to
communicate with those computers, setting themselves up
with a skill they can use to make lives easier through a
.variety of different career fields
For instance, computers are used in art, with robots that
!can be programmed to paint
Robots themselves are like computers and need to be
.programmed before they can do anything
Computer programming is the way we use to give
computers instructions to follow and functions to do. Block
code is a programming element that converts text-
based software code into a visual block format to reduce
potential errors. Users can construct games, apps, and
other programs by dragging and dropping visual block
programming representations of text-based code (event
listeners, functions, variables, audio, and more) into the
.code editor
The first block coding language was developed at MIT in
2003 with the express purpose of teaching school children
how to code. Scratch was the name of the language. Since
then, dozens, if not hundreds, of schools and children
learning programs have adopted block programming as the
most successful method of teaching coding to children.
Rather than memorizing, it leaned heavily on visual aids
.and practical sequential reasoning
Knowledge Check
Lesson 2: Block-Based Programming Method
What does block-based programming consist of?
Block-based programming involves combining blocks of
instructions in a drag-and-drop interface.
The blocks each contain a small portion of computer code
and are usually shaped so that they fit together in a given
manner. When the code is run, the groups of instructions
are carried out.
Block Categories
Block categories are a way of organizing blocks in any
block-based programming language. Blocks are
categorized based on their function. Each block is
represented using a circle, and each circle has a different
color. The blocks that fall under the same category share a
common color.
The main categories of any block-based
programming language:
Events are one of the main block categories in
any block-based programming language.
Events blocks define the triggers when the script
should start.
All the other blocks will have no meaning till an
event block is used to define when a script is to
be run.
These blocks are usually yellow and are
essentially used to run a script, making them
essential in any project.
Control blocks are one of the main categories in
any block-based programming language.
The function of the control blocks is to control
the actions and the decisions you can take in
coding under certain conditions, which can be
done by inserting conditional statements, loops,
repeats, and causes.
These types of code blocks are compelling if you
combine them with variables and/or operators.
These code blocks are color-coded amber.
Example
Here is a simple application example that asks the
user to choose the type of background to display.
What we need here at first is a block to start the
program.
Then, a block can enable us to ask questions and
wait for a response. In this block format, you have a
free space to write any question.
After this, depending on the user's answer, you
can choose which background to display using
the 'if' condition block and the switch background
command block.
Knowledge Check
Lesson 3: Interactive Activity
How does block-based coding work?
The blocks in the activity below are not arranged!
[Link] the text.
[Link] drag each block to the box on the right in the
correct order!
[Link] all blocks after arranging them, and you will get
the answer
Lesson 4: Quiz
What can we create with block-based coding?
You must be intrigued by the fact that block coding can
create exciting stuff. If we talk more practically, you can
almost make what you imagine. You can bring any
character and story to life by creating various shapes. With
the help of block-based coding, we can do the following
things.
Games
Chase: The player aims to hunt down or avoid a
moving object. Digital hide-and-seek games are
prime examples.
Clicker: This game style has the player clicking on
things, such as a cupcake or cookie, to earn points
to buy upgrades.
Adventure Games: Those who play these advanced
games must make their way up multiple levels.
Mobile Applications
You can design, code, test, and deploy on your own
Android phone/tablet using blocks using MIT App Inventor.
Create your own Android app using blocks programming
using MIT App Inventor.
MIT App Inventor is a web-based, totally free interface for
developing Android apps. You do not write any codes; you
just join blocks in sequences to create your applications.
Robotics
Many robot programs are developed using block-based
programming. For robotic applications, it can be a good
practice to use many advanced sensors and drivers using
only some simple blocks.
Animations and Stories
Using block-based coding, kids can make basic animations
that include music, movements, and a variety of
characters. Interactive fiction stories are familiar, too!
Knowledge Check
Lesson 4: Interactive activity
Interactive Activity
The cards below contain a list of items. Some can be
created by block-based coding programs, while others
cannot be sorted out.
Lesson 5: Quiz
Lesson 6: Introduction to Blockly
Get to Know Blockly
[Link] is an open-source visual code editor for mobile
and web pages.
[Link] uses interlocking graphical blocks to represent code
concepts like loops, variables, and expressions.
[Link] can export Python, JavaScript, PHP, and Dart
code.
[Link] teaches coding to beginners through
increasingly challenging puzzles.
[Link] solve puzzles by dragging and dropping code
blocks.
Blockly is available online and does not require any
desktop software, so you can access it through many
internet browsers.
Blockly Interface
Explore the workspace, blocks, and categories below to
discover the Blockly interface. Then, try the zoom and pan
controls. Have fun and record your observations and notes.
Workspace:
The workspace is the main area where users build their
programs. It is a canvas where blocks can be dragged,
dropped, and connected to create codes.
The workspace is typically a grid, and blocks snap to
this grid for alignment.
Blocks:
Blocks are the visual representations of code
commands. Each block corresponds to a specific
programming statement or function.
Blocks are color-coded based on their category,
making it easy to identify and organize different types
of commands.
Categories:
Blocks are organized into categories, such as "Logic,"
"Loops," "Math," etc. Each category contains related
blocks, helping users find the commands they need.
Categories are often displayed as tabs or menus on the
side or top of the workspace.
Zoom and Pan controls:
Users can often zoom in and out of the workspace to better
see their code; pan controls allow them to move around it
quickly.
Knowledge Check
Lesson 7: Variables Concept
How to create a variable in Blockly:
In programming, the process of creating a variable is
called defining it. We can define a variable by giving it a
name and a value.
Creating Variables
Create variables in Blockly by clicking (create a variable) in
the "variables" category.
Add Name to the Variable
Then, you will get a message asking you to enter the
variable name. Please enter a name that has meaning and
reflects what you want to store in it.
Assigning Value
Then, to assign a value to your variable, you need to
choose its type, whether a text or a number. You can find it
in the text and math categories.
Using Variable
Now, you can drag the block, considering the type of data
you need and typing the value.
Print the Variable
The next step is to display the value stored in the variable
to the user, which you can do using the print block.
Print is usually used to display something on the screen. To
do this, tell the program to print the variable you created,
demonstrating its value. Give it a try!
Knowledge Check
Lesson 8: Interactive activity
Interactive Activity
Your Task: Variables
Getting Started
Remove the default blocks by dragging and dropping them
into the block palette.
Create Three Variables
[Link] first one is named welcome_message and store
in it >> "Hi there!".
[Link] second one is named my_name and stores your
name.
[Link] third one is named message and stored in it >>
"This is my first code using Blockly. Now, I am
talking in machine language!".
[Link], you should print all messages by order.
[Link] the blocks accordingly, then click on Run.
Solve it here!
Did you follow all the steps to complete the task?
Yes, I followed the steps.
Solution
Lesson 9: Conditional Statements Concept
The Power of Conditional Statements in Block-Based
Programming Projects
If-Else Statement
The 'if' part tells us what to do if something is accurate,
and the 'else' part tells us what to do if it's not true.
Imagine you have a robot. You can tell the robot, "If you
see a red ball, pick it up. If you see a blue ball, leave it
there." The robot knows what to do depending on the color
of the ball it sees.
Knowledge Check
Lesson 10: Interactive activity
Your Task: Conditional Statements
Getting Started
Remove the default blocks by dragging and dropping them
into the block palette.
Create an algorithm that gets the greatest number
of three:
[Link], create a variable that holds the first, second and
third number.
[Link] the first variable, store a value of 50, the second a
value of 15, and the third, 90.
[Link] an if statement that compares between the
three numbers and prints the greatest of them.
[Link] the blocks accordingly, then click on Run.
Solve it here!
Did you follow all the steps to complete the task?
Yes, I followed the steps.
Assign variables:
Add Conditional Statements:
Print Message:
Now, try playing with the values of each variable and
testing your code to see if it works for different cases.
Lesson 11: Loops Coding Concept
Exploring Loops in Block-Based
Programming
Loops let you repeat sections of your code. They’re a
great shortcut and without them, you might have to
connect the same blocks repeatedly!
Blockly has three different types of loops:
[Link] Loops will repeat whatever is inside them for
an infinite number of times or as long as the code is
running.
[Link] Loops will repeat the code inside them for the
number of times you choose.
[Link] Loops will repeat the code inside them until a
certain condition that you set is true.
Loops With Conditional Statements
Conditional statements are commonly used with loops.
Loops and conditional statements work together in
programming to create repetitive actions based on a
condition.
Knowledge Check
Lesson 12: Interactive Activity
Your Task: Loops
Getting Started
Remove the default blocks by dragging and dropping them
into the block palette.
Try to make a counter that counts from 1 to 10 and
prints a message that says, "Game Over!" when it
finishes.
[Link], think of creating a variable to hold the counting
number and name it count.
[Link] make it count, try to increase the counter by 1 and
repeat it for 10 times.
[Link] if the count value equals 10 each time you
change its value.
[Link] the blocks accordingly, then click on Run.
Solve it here!
Did you follow all the steps to complete the task?
Yes, I followed the steps.
This is the solution
Lesson 9: Conclusion
Chapter 4: Text-Based Coding Using "RoboMind"
Learning Objectives:
Explain how to use new components like list views and
storage area databases for various applications.
Understand the differences between layouts (vertical
and horizontal) and apply them in different
applications.
Learn about databases and how to store data in our
application securely.
Customize the appearance of UI elements, such as
buttons, to suit personal preferences.
Personalize the forms and backgrounds of various UI
elements, such as buttons.
Lesson Outline:
In today's lesson, we will be delving into the captivating
programming world, specifically focusing on text-based
programming and its significance in the field. We will first
explore the differences between text-based and block-
based programming. Understanding these distinctions is
crucial as it allows us to understand programming
languages and their functionalities better. Next, we will
introduce you to an exciting platform called RoboMind.
RoboMind is an educational software that provides an
excellent foundation for learning programming concepts.
Once you have the software up and running, we will
familiarize ourselves with the program's interface and the
basic instructions of the Robo Programming language. We
will cover fundamental concepts such as loops, conditions,
variables, and procedures. These concepts are building
blocks in programming and are crucial in creating robust
and functional programs.
We will take time to recap the key concepts covered in the
lesson as we progress. Let's dive into this lesson and
embark on an educational journey that will shape your
future in programming.
Lesson 1: Text-Based & Block-Based Programming
Text-Based Programming Languages
Text-based programming languages necessitate direct
composition and comprehension of lines of code for
creating programs. In contrast, visual-based (or
block) programming involves using graphical blocks
dragged and dropped to formulate the program's logic and
structure, eliminating the need for explicit code writing and
syntax understanding.
Text-based programming involves writing code using
language-specific text, like Python or Java, adhering to
syntax rules. Block-based programming, seen in platforms
like Scratch or Blockly, uses visual blocks assembled by
drag-and-drop to represent code constructs without syntax
requirements. Text-based languages offer flexibility for
complex projects and are used professionally.
In contrast, block-based programming simplifies coding,
targeting beginners by visually demonstrating
programming concepts. Text-based coding relies on typed
commands for complex control, while block-based systems
offer a graphical, beginner-friendly interface to introduce
coding logic without syntax complexities. Both serve
distinct purposes: text-based for professional development
and block-based for educational accessibility.
Knowledge Check
Lesson 2: Text-based programming
What Does Syntax Mean in Programming?
Syntax is the set of rules defining the various combinations
of symbols. It tells the computer how to read the code.
Syntax refers to a concept in writing code that deals with a
very specific set of words and a very specific order to those
words when we give the computer instructions.
How Do We Write Code?
Three crucial components shape how we write code when
using a computer's language. It's time to uncover the
secrets behind these building blocks that make our digital
world come alive. Continue to learn what they are.
Coding Components
Words:
This is like the ABCs of computer language. It's how letters
make special groups called "Tokens." Tokens are building
blocks of code. They can be names, signs, numbers, or
unique words. Each type does a specific job in the
computer’s language.
Keywords are predefined words in programming
languages used to indicate specific actions in a program,
such as these keywords, which will be presented later in
our chapter.
Operators are symbols that do operations between
different items.
Separators are the special symbols used to separate
tokens from each other.
Phrases:
Just like in regular talk, words come together to make
phrases. But in computer language, they have their own
special way of coming together to make sense.