Search Header Logo
prep 1 second term

prep 1 second term

Assessment

Presentation

Computers

7th Grade

Practice Problem

Hard

Created by

Wafaa Soliman

FREE Resource

76 Slides • 0 Questions

1

media

0

Computer & Information

2

media

1

Preparation and Review Committee

Mr. Tamer Abdel Mohsen Mansour

Manager of the Educational Computer

Department

Within the General Administration for
Curriculum Monitoring and Evaluation

Mr. Waseem Salah El-Din El-

Manzlawy

Manager of the Educational Computer

Department

Within the General Administration for
Curriculum Monitoring and Evaluation

Dr. Mohamed Abdul Tawab Abdullah

Expert teacher at STEM schools

Dr. Taher Abd Elhamed ElAdly

Head of ICT Department

the General Administration of Curriculum

Planning and Formulation

Dr. Abeer Hamed Ahmed

Computer Education Consultant

Within the General Administration for
Curriculum Monitoring and Evaluation

Prof. Mohamed Fahmy Tolba

Computing and Information Professor,

Faculty of Computing

Ain Shams University

Prof. Al-Gharib Zaher Ismail

Educational Technology Professor, Faculty

of Education

Mansoura University

Supervised by

Dr. Akram Hassan

Assistant Minister for Curriculum Development

Supervisor of the Central Curriculum Development Division

3

media

2

Contents

Page

Topics

S

Chapter Two (Artificial Intelligence and Programming)

5

Lesson 1: Artificial Intelligence Applications

1

17

Lesson 2: Sensors

2

27

Lesson 3: Robot

3

37

Lesson 4: Scratch

4

50

Lesson 5: Sprites Area in Scratch

5

62

Lesson 6: Principles of Python

6

69

Lesson 7: Variables in Python

7

4

media

3

5

media

4

6

media

5



Lesson 1 Artificial Intelligence Applications

Objective :

By the end of the lesson, I will
be able to:

After the lesson, check the correct box:
I can...

- List types of artificial intelligenceVery good
Ok
Need more work

- Review some practical
applications of artificial
intelligence.

Very good
Ok
Need more work

- Suggest the largest number of
ideas for the uses of artificial
intelligence in our lives.

Very good
Ok
Need more work

Engage:

How has artificial intelligence helped us improve services in life? Explain that.

Learn

In previous years in the primary stage, you studied the definition of artificial
intelligence and some of its uses in our daily lives. In this lesson, we will
discuss the types of artificial intelligence and its applications in our lives.

Types of Artificial Intelligence:

Artificial intelligence is not just one type, but there are many and varied
types. Imagine that we have a large garden full of different flowers, each
flower has a different shape and color, and so is the case with artificial
intelligence.

7

media

6

oNarrow AI:

This type of artificial intelligence focuses on
performing a specific task, such as recognizing
faces or translating languages. Another
example is a robot that can play chess
brilliantly, but it cannot do anything else.

oGeneral artificial intelligence (GAI):

This type of artificial intelligence is more advanced, and can perform any
task that a human can do. Example: A robot that completely mimics a
human, as it can think, innovate, solve complex problems, learn, and
adapt to different situations.

oSuper artificial intelligence (SAI):

This type of artificial intelligence is the most advanced; it can solve
problems that are difficult for humans to solve easily, and discover
new things that we have never imagined before.

Activity:

Dear student, with the help of your teacher and in cooperation with your
colleagues, search for the uses and the applications of artificial intelligence in
our daily lives?

Applications of artificial intelligence in daily life:

Personal Assistant: Do you have a friend who talks to

you, answers your questions, and performs tasks? This is
the personal assistant like (Siri) or (Alexa), it uses
artificial intelligence to understand your commands and
perform them.

Smart Games: Do you play video games? Some of these

games use artificial intelligence to make the game more
fun and challenging, as the characters in the game can
learn from their mistakes and become smarter.

8

media

7

Smart Cars: Have you ever imagined a car driving itself

without a driver? This is the dream of the future that is
getting closer to being realized thanks to artificial
intelligence.

Digital Doctors: Doctors use artificial intelligence to help

them diagnose and treat diseases faster and more
accurately.

Instant Translator: Have you traveled to another country

and spoken a different language? Artificial intelligence can
translate words and sentences instantly, making it easier
for people to communicate.

Smart Shopping: Have you noticed that shopping sites

offer you suggestions for products that you might like?
This is thanks to artificial intelligence that analyzes your
previous purchasing behavior.

Artificial Intelligence Fields:

Artificial

Intelligence

Fields

Machine
learning

Natural
Language
Processing

Computer

Vision

Robotics

Expert
Systems

Deep

Learning

9

media

8

Artificial Intelligence Fields

1. Machine Learning - Learning from Mistakes:

oAI has to learn new things, the more we show it a picture of a cat, the more it

learns to name it, and the more we play a game with it, the smarter it becomes,
this is called Machine Learning, and it is similar to when you learn to ride a
bike, the more you fall, the better you learn how to balance.

2. Natural Language Processing - Understanding Languages:

oCan you imagine talking to your computer as if it were a friend? It

understands our different languages and can answer our questions. This is
Natural Language Processing, and it is like an intelligent language
translator as it understands written and spoken human language, interprets it,
and learns to "speak" human language.

3. Computer Vision - Sees the World:

oAI can look at a picture and tell you everything in it, and it can find your

face in a crowded picture, and distinguish between pictures of different
animals, which is called Computer Vision.

4. Robotics:

There are smart robots that do many tasks such as cleaning the house, playing
chess, or performing complex and precise surgery, and they have the ability to
work with great accuracy even in environments that are dangerous to humans.

5. Simulation of human thinking and decision-making - Expert Systems:

Artificial intelligence can solve complex problems and make difficult decisions.
This is the field of expert systems. It is similar to an intelligent doctor who can
diagnose diseases.

6. Simulation of human learning - Deep Learning:

Deep learning aims to enable computer systems to learn complex tasks in a way
similar to the way humans learn. Artificial intelligence has a mind similar to the
human mind. It uses this mind to learn things very quickly. Deep learning relies
mainly on neural networks and deep learning.

10

media

9

Create intelligent models to recognize images, sounds, and movements using
machine learning (Teachable Machine):

Imagine if you could teach a computer to recognize objects in the same way you
learn! This is exactly what Teachable Machine does, an easy-to-use tool that helps
you create intelligent models to recognize images, sounds, and movements.

Activity:

Dear student, with the help of your teacher and in cooperation with your
colleagues, download the Teachable Machine website.

Note: It is preferable to update your internet browser and work on the Microsoft
Edge browser.

Click on the following link to enter the websitehttps://teachablemachine.withgoogle.com/"

Home screen layout of the site

Model Building Training:

Imagine that you are training a young child to do new things! First, you need to
teach him the names of things.

You show the young child a picture of a cat and say, “This is a cat,” then you

show him a picture of a dog and say, “This is a dog.”

You are telling the child what things he sees, just as you teach him the names of

letters and numbers.

11

media

10

After the young child sees a lot of pictures and hears names, his little brain

starts to understand the difference between a cat and a dog, just like when
scientists try to train a computer to understand pictures and sounds.

The child has learned so well that he can now tell the difference between a cat

and a dog on his own, and in the same way, the computer has learned to
recognize different things, and we can use it for a lot of fun things!

Imagine that we want to teach the computer to recognize numbers. We can start by
giving him pictures of numbers from “0-9,” and telling him what number is in each
picture. After a while, the computer will be able to look at any number and tell us
what it is.

Website login window layout

Ready to explore the world of
photography? Our first project will take
you on an exciting journey!

The images of numbers from "0-9" are
prepared in the form of images of files
stored on the computer.

12

media

11

1. Classification that includes a group of images that belong to a specific category
such as images of numbers "from 0-9" and another classification that includes
images of alphabet letters.

2. Upload images of numbers in (Class1).

13

media

12

3. Open the camera, prepare images of numbers on paper boards" and have the
model take them in (Class2),

Note: The images were provided to the model in the form of files or he takes
them through the Web camera.

4. The artificial intelligence model is trained on the image categories that were
given to it.

5. Add more image categories when needed, for example "adding special symbols".

6. After that, the model can be given an image that determines for us which
category of images it follows.

Save the project:

1- Save the project on Google Drive…

2- Download the project to the device..

Practical example:

Suppose you want to make a game where you control a character on the screen
with your hand movement, here are the steps:

Training: You record your hand in different positions (such as raising the hand,

lowering it, moving it right and left).

Recognition: Teachable Machine learns to associate each position of your hand

with a specific movement of the character on the screen.

Game: When you move your hand in front of the camera, the character on the

screen moves according to what the computer has learned.

14

media

13

Example application:

Access the site:

Open your browser and type "Teachable Machine" in the search bar, then access
the site.

Select the training model:

We find several options, choose the option related to image recognition (Image).

Prepare the camera:

The site will ask you to choose to upload images (upLoad) or allow it to use your
device's camera (web). Click on the camera (web) and make sure that the lighting
is good and the camera background is simple so that the computer focuses on the
movement of your hand.

Train the computer.
Create Classes:

Create at least two classes (Class1) and (Class2), for example (Class1) "Raised
hand" and (Class2) "Shaky hand".

Record examples: In front of each category, record several examples of the

corresponding hand movement, for example, in front of the category "raised
hand", raise your hand several times and each time raise it with a specific
movement or a different shape, and so on in front of the category "shaky
hand".

Review examples: Make sure that the examples are clear and that the

computer understands the difference between the two movements.

Training: After you finish taking the pictures, click on the "Train Model"

button to teach the computer these movements.

Test the model: After you finish training, the site will ask you to test the

model.
oCamera: Point the camera at your hand and perform the movements you

trained.

oResults: You will see that the computer will try to guess the movement you

are performing.

Save the model: If you like the model, you can save it and use it in other

projects.

15

media

14

Ideas for your projects:

Recognize faces: Train the computer to recognize the faces of your friends

and family.

Create a motion control game: Use your body movements to control

characters in a video game.

Image classification: Teach the computer to classify images into different

categories (such as animals, food, colors).

Create a robot that follows you: Build a small robot that follows you

wherever you go.

16

media

15

Learn by doing

Put a check mark () in front of the correct sentence and a check mark () in
front of the incorrect sentence.

1.Artificial intelligence is only used in the video game industry. ( )
2.Artificial intelligence can help doctors diagnose diseases. ( )
3.Self-driving cars depend entirely on artificial intelligence. ( )
4.Artificial intelligence can learn new things slowly. ( )
5.Artificial intelligence is a science of computer science. ( )
6.For artificial intelligence to become intelligent, it needs small amounts of

information. ( )

7.Artificial intelligence is only one type. ( )
8.Narrow artificial intelligence can perform any task that a human can

perform. ( )

9.General artificial intelligence is more advanced. ( )
10.General artificial intelligence focuses on performing a specific task. ( )
11.Super artificial intelligence can solve specific problems. ( )
12.Smart Games are used to make playing games more fun. ( )
13.Instant Translator is used to facilitate communication between people. ( )
14.Smart Shopping gives you suggestions for products you might like. ( )
15.Natural language processing is like a machine language translator. ( )
16.Robots are very good at doing a lot of things with great accuracy. ( )

Self-assess

Go to the objectives at the beginning of the lesson.

Check the correct, I can........ box.

17

media

16

18

media

17

Lesson 2 Sensors


Objective:

By the end of the lesson, I will
be able to:

After the lesson, check the correct box:
I can...

- Mention the different types of
sensors and their areas of use.
Very good
Ok
Need more work

- List the importance of sensors in
our modern life.
Very good
Ok
Need more work

- Design a simple project based on
the idea of sensors.
Very good
Ok
Need more work


Engage:

How do sensors work? What devices have you seen or
used in your life?

Learn

In this lesson, we will learn about one of the most important concepts in the
world of modern technology, which is sensors. These simple devices play a
major role in our daily lives, from their use in robots to their use in our
smartphones, modern cars, and alarms.

We will learn together how these devices work and what their types are, and
we will review real-life examples that help us understand how theywork and
how they are used in electronic devices and robots.

Sensors: They are devices that sense changes in the
surrounding environment and convert them into signals so
that machines and devices can understand them and make
appropriate decisions based on them. They are considered the
eyes and ears of machines.

19

media

18

How do sensors work?

Have you ever wondered how the sensation of light, heat, or sound is converted
into numbers in a computer? Imagine that the sensor is a translator that translates
those sensations (such as heat, light, or sound) into a language that the computer
understands, which is the language of numbers. Sensors work through 3 main

steps:

1. Sensing: Captures information from the surrounding environment (such as heat,
light, or sound).

2. Signal Conversion: Converts this information into electrical signals that can be
read by electronic devices.

3. Transmission: Signals are sent to another device to display the results or
perform a specific operation. For example, a thermometer displays the temperature
result on a digital screen.

The importance of sensors for robots:

Imagine robots without sensors, they would be like a person walking with their
eyes closed and their ears covered, they cannot recognize what is happening
around them or recognize those around them or how to behave, here comes the
importance of sensors, they represent the "senses" of the robot, helping it to see,
hear, sense, and even touch things around it.

- Types of robotic sensors:

There are many different types of sensors used in robots, and each type has a
specific function.

Here are some examples:

Distance Sensors: Measure the distance between the robot and surrounding

obstacles, this helps the robot avoid collisions.

Light Sensors: Used in robots that operate in places where light is variable,

such as home robots, these sensors help the robot adapt to changing light
conditions.

Sound Sensors: These are used in robots that react to sounds, for example:

robots that can respond to voice commands.

20

media

19

Motion Sensors: These detect movement and changes in direction. These

sensors help the robot navigate and interact with surrounding objects.

Special Sensors: Such as temperature and humidity sensors.

Activity:

Dear student, with the help of your teacher and in cooperation with your
colleagues, mention examples of electronic devices that use sensors?

Some examples of electronic devices that use sensors:

Vacuum cleaner robot: uses sensors to avoid obstacles and clean under

furniture.

Surgical robot: uses precise sensors to perform surgeries.
Self-driving cars: rely heavily on sensors to see the road and make

decisions.

Activity:

Dear student, with the help of your teacher and in cooperation with your
colleagues, discuss with your colleagues the types of distance sensors?

Types of distance sensors and examples of them:

The types of distance sensors used in robots and smart devices vary, and each type
has its own advantages and uses. Here is a detailed explanation of the types of
these devices with illustrative examples:

1- Ultrasonic Sensors:

Working principle: These devices emit high-

frequency sound waves, then receive the returning
waves after they bounce off an object, and by
measuring the time it takes for the wave to return,
the distance to the object can be calculated.

Examples:

oVacuum cleaner robots: These devices are used to locate furniture and

obstacles to avoid colliding with them.

oParking systems: They help measure the distance between the car and

surrounding obstacles.

21

media

20

oFluid levels: They are used to measure the level of fluids in tanks and

reactors.

2- Laser Rangefinders:

Working principle: These devices emit a laser

beam and then measure the time it takes for the
beam to return after bouncing off the object,
and are characterized by high accuracy and a
longer range compared to ultrasonic devices.

Examples:

o3D laser scanners: They are used to create

3D models of spaces.

oGround scanning systems: They are used in geological and

archaeological surveys.

oIndustrial measurement systems: They are used to measure dimensions

with high accuracy in various industries.

3- Visible Light Sensors:

Working principle: These devices use digital cameras to analyze images

and determine the distance to objects based on the size and distortion of the
image.

Examples:

oSelf-driving car cameras: used to determine

the distance to other cars, pedestrians, and
traffic signals.

oIndustrial vision systems: used to inspect

products and identify errors.

oAugmented reality systems: used to integrate

digital elements with the real world.

4- Infrared Sensors:

Working principle: These devices emit infrared

rays and then receive the returning rays after they
bounce off the object, widely used in consumer
electronics.

22

media

21

Examples:

oRemote controls: Infrared rays are used to communicate with electronic

devices.

oNon-contact thermometers: Used to measure body temperature without

the need for direct contact.

5- Time of Flight sensors:

Working principle: It depends on measuring the

time it takes for a light pulse to reach an object
and return to it, characterized by high accuracy
and high speed.

Examples:

o3D sensors: Used to create 3D models of

objects.

oMotion tracking systems: Used in video games and virtual reality

systems.

Activity:

Dear student, with the help of your teacher and in cooperation with your
colleagues, discuss the factors for choosing the appropriate type of sensor?

Choosing the appropriate type of sensor depends on several factors, including:

Required range: The maximum distance that the device must measure.
Required accuracy: The required measurement accuracy.
Operating environment: The environmental conditions in which the device

will operate (lighting, temperature, humidity).

Cost: The cost of the device and installation.

By choosing the appropriate device, robots and smart devices can interact
with their environment more accurately and effectively.

Activity:

Dear student, with the help of your teacher and in cooperation with your
colleagues, mention electronic devices that you use in your daily life and that
depend on sensors in their work?

23

media

22

Daily applications of sensors:

Sensors are used daily in our lives, and the most prominent of these applications
are:

In smartphones: There are sensors that help in taking pictures, adjusting the

lighting level, and even determining the location of the phone.

In modern cars: Sensors are used to determine speed, warn of collisions,

and help the driver park his car.

In smart homes: Motion sensors turn on the lights automatically when

someone enters the room.

Phone microphone: It is a sound sensor that converts the sound you pick up

into electrical signals that can be understood by the phone.

Motion sensor in games: When you tilt your phone to the right or left while

playing a game, the motion sensor is what tells the game to change the
direction of the character.

Touch screen: It is a group of small sensors that sense where your finger

touches the screen.

Activity:

Dear student, with the help of your teacher and in cooperation with your
colleagues - and with the help of the science teacher, use a temperature sensor.

Practical activity:

Required materials:

Temperature sensor.
A cup of hot water.
A cup of cold water.

Steps:

1.Measure the temperature of the hot water using the temperature sensor.
2.Repeat the process with cold water.
3.Notice the difference in temperatures displayed on the device screen.

24

media

23

Learn by doing

Choose the correct answer from the following:

1. The main function of the sensor is …….....

A. Store data

B. Capture environmental changes and convert them into signals

C. Display images

D. Produce sound

2. Sensors help robots to..........

A. Teach them new languages

B. Allow them to interact with their environment

C. Increase their size

D. Slow down their operations

3. A type of sensor ............ is used to avoid obstacles.

A. Light sensors

B. Sound sensors

C. Distance sensors

D. Heat sensors

4. The first step in the operation of the sensor is ………...

A. Transmitting

B. Displaying

C. Sensing

D. Transduction

5. ……....... are commonly used in remote controls.
A. Ultrasonic sensors
B. Infrared sensors
C. Light sensors
D. Motion sensors

25

media

24

6. Laser rangefinders are accurate because they use ……......
A. Sound waves

B. Visible light

C. High frequency waves

D. Laser beams

7. A common application of sensors is the use of infrared in .............

A. Smartphones

B. Remote controls

C. Vacuum cleaners

D. 3D scanning

8. In which environment are light sensors useful? ………....

A. In dark rooms

B. In places with variable lighting conditions

C. In underwater environments

D. In noisy factories

9. One of the sensors that are used to measure distance using high frequency
sound waves is ………......

A. Ultrasonic sensors

B. Laser rangefinders

C. Infrared sensors

D. Motion sensors

10. ……....... sensors are used to turn on lights when someone enters the room.

A. Smartphone

B. Smart car

C. Smart Home Lighting System

D. Smart Watch

26

media

25

11. …………. is used for non-contact temperature measurement.

A. Ultrasonic sensor

B. Infrared sensor

C. Light sensor

D. Motion sensor

12. ……….. is the main purpose of the signal conversion step in sensors.

A. Display the results

B. Send the signals to another device

C. Convert the information into electrical signals

D. Turn off the sensor

13. …………… helps cars determine the distance to other vehicles.

A. Sound sensors

B. Light sensors

C. Infrared sensors

D. Distance sensors

14. …………… is the practical use of motion sensors in games.

A. Change the volume

B. Adjust the brightness of the screen

C. Track the movements of players

D. Improve the sound quality

15. Factors that determine the choice of a sensor for a particular
application……….. .

A. Brand of the device

B. Color of the device

C. Environment and required accuracy

D. Size of the device

27

media

26

28

media

27

Lesson 3Robots


Objectives:

By the end of the lesson, I will
be able to:

After the lesson, check the correct box:
I can...

- Explain the concept of robot.

Very good
Ok
Need more work

- List the types of robots and their
functions.
Very good
Ok
Need more work

- Suggest the largest number of
ideas for the uses of robots in our
lives.

Very good
Ok
Need more work

Engage:

What is a robot? What functions can a robot perform? Explain?

Learn

The world is full of amazing robots that can do incredible things! Can you imagine
a robot that can clean your room, another that can help you with your daily tasks?
Or maybe a small robot that runs and plays with you like a pet! Robots can help us
in our daily lives and in various fields.

Definition of Robot:

A robot is a device that can be programmed to perform a set of specific tasks
automatically. The robot can move, sense (via sensors), and interact with its
surroundings and can be used in environments that require precision and speed of
performance.

Example:When we see a vacuum cleaner moving by itself in the house to clean
the floor, this is a type of robot that works independently.

1- Types of robots: There are several types of robots, including:

29

media

28

Industrial robots:

They are robots used in factories, and they can perform work with high
accuracy, such as robots that work in car production plants on production
lines quickly and accurately.

Home robots:

These robots are found in homes, cleaning
robots such as Roomba that help clean floors
without any human effort, such as smart
vacuums.

Medical robots:

Medical robots help doctors perform surgeries,
and they can be very accurate.

Educational robots:

These robots are used in schools to teach students how to program and
technology, such as LEGO Mindstorms robots that can be programmed to
perform specific tasks, to help students and to be an aid to the teacher.

Types of Robots

Activity:

Dear student, with the help of your teacher and in cooperation with your
colleagues, discuss with your colleagues the components of the robot.

30

media

29

2- Robot components:

Structure

The structure is the main part that
carries all the components of the
robot. It can be made of different
materials such as metal, plastic, or
carbon. The design of the structure affects the weight of the robot and its
ability to move.

Sensors

Sensors are the senses of a robot.
Just as we use our eyes to see and
our ears to hear, a robot uses sensors
to pick up information from its
surroundings. Some examples of
sensors are:
oSound sensors: pick up and

analyze sounds.

oCameras: help robots “see”

things in front of them.

Motors

Motors are used to move parts
of a robot. There are different
types of motors, such as
electric motors and pneumatic
motors, each with its own
uses. Motors are the industrial
muscles of robots. Thanks to
motors (actuators), robots can
move and execute commands.
oMotors: make robots

move.

oRobotic arm: used in factories to move objects with precision.

31

media

30

Controller:
The controller is the “brain” of

the robot, processing the data
collected by the sensors and
issuing commands to the motors.
The controller can be as simple
as electronic circuits or as
complex as microcomputers. Just as our brain thinks when we decide to
move, the processor makes the decisions necessary to move the robot.

Power Source:

Robots need a power source to
operate. Power sources can be
batteries, solar cells, or even
direct electrical power sources.
The choice of power source
depends on the type of robot and
the required operating time.

Software:

Software is what makes a robot
“smart.” Software includes
algorithms that determine how
the robot responds to information
it receives from sensors.
Software can range from simple
programs to complex artificial
intelligence systems.

Communication tools:
Robots use communication tools

to interact with users or other
robots. These tools can include
Bluetooth, Wi-Fi, or other
communication technologies.

32

media

31

Example:A home robot, such as a robot vacuum cleaner, has sensors to avoid
collisions with furniture and room walls.

3- Areas of use of robots:

Robots have become part of our daily lives and are used in several fields, such as
medicine, industry, and education.

For example, in hospitals, there are robots that perform precise surgeries, while in
factories, they help manufacture cars. Robots have many applications in
different fields, including:

Industry: Improving productivity and reducing human errors.
Healthcare: Assisting doctors in surgeries or providing care for patients.
Education: Providing interactive educational experiences for students.
Agriculture: Using robots in precision agriculture to increase crops and

reduce waste.

Activity:

Dear student, with the help of your teacher and in cooperation with your
colleagues, discuss what are the challenges facing robotics technology?

33

media

32

4- Challenges

Despite the many benefits of robotics, there are challenges facing this technology,
such as:

Safety: The need to ensure the safety of robots during work.
Employment: Concern that robots may replace human labor.
Ethics: Issues related to robots and their impact on society.

Activity: Dear student, with the help of your teacher and in cooperation
with your colleagues, discuss what are the benefits of robots?

5- Benefits of robots:

Robots offer many benefits in various fields, as they help improve work efficiency,
reduce errors, and save time. The most prominent benefits of robots are:

- Increased efficiency and productivity

Industrial robots can work continuously without fatigue or interruption,

which increases the amount of production in factories and saves time.

In production lines, robots can perform repetitive tasks accurately and

without any delay, which improves the quality of products and reduces
errors.

- High accuracy and reduced errors

Medical robots are used in complex surgeries, helping doctors achieve

greater accuracy and reduce the chances of human error.

In the electronics industry, robots assemble small parts with precision,

improving manufacturing accuracy and reducing losses due to defects.

- Safety and security

Robots help in dangerous tasks, such as dismantling bombs or working in

hazardous environments, which reduces the risk to human lives and makes
these tasks safer.

In factories, robots can handle heavy weights and hazardous chemicals,

reducing the chances of worker injury.

34

media

33

- Adaptability to diverse work

Robots can be programmed to perform various tasks as needed, making

them capable of performing different jobs efficiently. For example, home
robots can clean or entertain.

In the field of education, robots help students learn programming and

science in interactive ways to help students and teachers.

- Reduce costs in the long run

Although the cost of manufacturing and installing robots may be high,

robots reduce costs in the long run by reducing the need for human labor,
achieving greater accuracy, and reducing errors and waste.

- Contributing to development

Robots encourage technological development and open new horizons in

many fields such as space, where robots are used to explore planets.

In the field of medicine, robots contribute to advanced medical research and

the development of new treatments.

Activities:

Dear student, with the help of your teacher and in cooperation with your
colleagues, you can do some of the following activities:

Through the Internet, search for a picture of a robotic vacuum cleaner,

discuss with your colleagues how it works using sensors

Search for pictures of types of robots, try with your colleagues to classify

them according to use (domestic, industrial, medical, exploratory).

Think of a robot that helps you and your colleagues in your daily lives,

describe how this robot can work.

Draw a robot on a piece of paper for you to use at home, identifying the

three parts: motors, sensors, and processor.

Draw an idea for a robot that you wish to own or manufacture in the future,

and write a short description of its function.

35

media

34

Learn by doing

First: Put a check mark () in front of the correct sentence and a check mark
() in front of the incorrect sentence.

1.Sensors do not play a role in the movement of robots and sensing their

surrounding environment. ( )

2.Robots work is limited to factories only. ( )
3.Medical robots help doctors perform surgeries. ( )
4.The design of the structure affects the weight of the robot and its

ability to move. ( )

5.Vision sensors are used to capture sounds. ( )
6.The motors used in robots include electric motors and air motors. ( )
7.The control unit processes the data collected by the sensors and issues

commands to the motors. ( )

8.Robots rely on direct energy sources only and we cannot use batteries

or solar cells. ( )

9.Robots do not need to use software in their work. ( )
10.Robots use communication tools to interact with users or other robots. ( )
11.The areas of use of robots include industry, healthcare, and education. ( )

Second: Choose the correct answer from the following:

1- The challenges facing robotics technology include………...

A- Increased reliance on paper documents.

B- Increased reliance on smartphones.

C- Safety, employment and ethics.

D- Increased reliance on traditional machines.

2- In production lines, robots can perform repetitive tasks accurately and
without any delay, which leads to..................

A- Increased efficiency and productivity.

B- Decreased efficiency and productivity.

C- Lack of product development.

D- Slow production process.

36

media

35

3- Robots help in dangerous tasks such as.................

A- Transportation.

B- Handling heavy weights and hazardous chemicals.

C- Irrigating gardens and parks.

D- Cleaning the house

4- To take pictures and videos, we use sensors …………...

A- Sound

B- Touch

C- Light

D- Vision

Self-assess

Go to the objectives at the beginning of the lesson.

Check the correct, I can........ box.

37

media

36

38

media

37

Lesson 4 Scratch


Objective:

By the end of the lesson, I will
be able to:

After the lesson, check the correct box:
I can...

- Explain the uses of the Scratch
program
Very good
Ok
Need more work

- Deduce the features of the
Scratch program
Very good
Ok
Need more work

- Use the Scratch program to
create a simple project
Very good
Ok
Need more work

Engage:

What is Scratch? Suggest some simple projects where Scratch can be used.

Learn

Scratch Program:

Scratch program provides a very wide range of ideas that can be programmed,
including games, animations, comics, music, simulations, and interactive games
for artificial intelligence for the student to learn the principles of programming.

Scratch program allows students to be creative while learning, to feel as if they are
playing a fun game while learning, as it is a fun and easy-to-use educational tool
that allows learning the basics of programming in a visual and enjoyable way
without the need to write a lot of complex codes.

Scratch program features:

Simple interface: Scratch uses a visual interface based on blocks (bricks or

commands), which are placed on top of each other in a specific system and
order to form programs.

Educational program: Scratch is specially designed to teach basic

programming concepts in a fun and exciting way.

39

media

38

Free program: Scratch can be downloaded from its official website and used

for free.

Developing creative thinking: Scratch helps learners develop their skills in

creative thinking and problem-solving.

Enhancing problem-solving skills: By trying mistakes and learning from

them, students learn how to solve problems in a logical way.

Developing Collaboration Skills: Students can work together on Scratch

projects, which enhances teamwork skills.

An exciting start to the world of programming: Scratch provides a strong

foundation for moving on to more difficult programming languages in the
future.

Sharing the project: Projects can be shared with others.

Activity: With the help of your teacher and in cooperation with your
classmates, discuss with them how you can start using Scratch to create your
first project?

Getting Started with Scratch:

1.Download: Scratch can be downloaded for free from its official website, it

can be obtained from the Internet through the linkhttps://scratch.mit.edu.

2.Explore: Explore the interface and learn how the different blocks and

commands work.

3.Create a project: Start by creating a simple project, such as animating a

character or creating a short story.

4.Save the project.

Download the program:

Through the following website https://scratch.mit.edu/download, the Scratch
program is downloaded.

40

media

39

Getting to know the program interface:

1.Menu Bar.
2.Command Blocks Area.
3.Script Area (it collects programming sections "composing a group of

graphical commands called blocks in a specific order").

4.Stage Area (it shows the result of the work or project).
5.Sprite object.
6.Sprites Area (it contains the objects used in the project).


Activity:

With the help of your teacher and in cooperation with your colleagues, discuss
with them how you can change the language of the program interface?

Changing the language of the program interface:

41

media

40

Try to change the language of the Scratch program interface to Arabic.

Project (1): What is required in the project is:

- Move the sprite (cat) on the platform or stage "30 steps".

- Then the phrase "Good morning" appears.

Implement the project:

To be able to move the sprite (cat) on the stage, follow these steps:

- From the command blocks area, Motion group, click and drag the command
and drop it in the programming area Script Area as shown below:

42

media

41

- To make the object's movement steps 30 steps, double-click on the value 10
on the (command) block and write the value 30 as in the following figure:

Write the value 30 on the block as in the following figure:

To display the phrase "Hello":

1-Select the Looks command

group

2-Then select the command

43

media

42

3-Then click and drag on the command and drop it into the platform below the
previous command.

To view the implementation of the project steps

1- In the Script Area, click on Events Blocks

2- Click on the command

and drag it to the platform

3- To be installed at the beginning of the programming section as shown in the
figure

4-To execute the project, click on the icon

44

media

43

5-To stop the execution of the project, click on the icon

Note: When executing the previous project, we notice that the movement was
done quickly. To address this, we can use the Wait command from Control
Blocks by following the following:

1- Click on Control Blocks

2- Click and drag a command

and drop it into the Script Area

3- Place it as shown below:

4-To re-execute the project, click on the icon

45

media

44

Important notes:

The wait value represents (1 second).
Installing a set of commands in a specific order called a code section.
Use click, drag and drop to deal with any command (within) the code

section.

Modify the project (1): Modify the previous project to make the movement
continuous

To make the movement continuous, you can install the command several

times

Re-arrange it by clicking and dragging to the place where you want to

start the repetition

Modify the word "Hello" to the phrase "Good morning".

Activity:

With the help of your teacher and in cooperation with your colleagues, discuss
with them how you can:

- Determine the value of the object's coordinates on the platform?

- Change the value of the object's coordinates on the platform?

46

media

45

Note that:

Before implementing the project, the value of the object's coordinates on the
platform is:

X=0 which is the horizontal axis and represents horizontal movement, Y=0
which is the vertical axis and represents vertical movement

Implement the project Note the value X=0 and the value Y=0 after
implementing the project

You can control the position of the Sprite on the platform by clicking on it

and (drag & drop).

Activity:

With the help of your teacher and in cooperation with your colleagues,
discover with them the coordinates of the platform, how can you change the
position of the object on the platform?

47

media

46

Discover the coordinates of the platform

You can control the location of the Sprite object on the platform by clicking

on it and (drag & drop) to another place on the platform.

Save the project in a file

To save your project, do the following:

1-From the File menu, choose Save to your computer.
2-Select a location to save the file on one of the storage media.
3-Type the file name "Project 1"

48

media

47

Note that:

- The file name is "Sb3 Project 1"

- The file extension is Sb3.

49

media

48

Learn by doing

Put a check mark () in front of the correct sentence and a check mark () in
front of the incorrect sentence.

1-The Scratch program provides a very wide range of ideas that can be

programmed. ( )

2-The Scratch program helps the student learn the principles of programming.( )
3-The Scratch program is considered a difficult educational tool to use. ( )
4-The student in the Scratch program needs to write a lot of complex codes. ( )
5-Scratch uses a visual interface based on blocks. ( )
6-The Scratch program is paid. ( )
7-In the Scratch program, students face difficulty in sharing projects

with others. ( )

8-In the Scratch program, the Stage area shows the programming sections. ( )
9-In the Scratch program, the result of the work or project appears in the Area

Blocks area. ( )

10-To implement the project, click on the symbol. ( )

Self-assess

Go to the objectives at the beginning of the lesson.

Check the correct, I can........ box.

50

media

49

51

media

50

Lesson 5Sprites Area in Scratch


Objectives:

By the end of the lesson, I will
be able to:

After the lesson, check the correct box:
I can...

- Discuss the concept of sprites
area in Scratch
Very good
Ok
Need more work

- Create a simple project in
Scratch and its role in our lives.
Very good
Ok
Need more work

- Develop my project (add-delete-
modify) for sprites on the projectVery good
Ok
Need more work

Engage:

How can you set up a simple project on Scratch?

Learn

Sprites area (contains the sprites used in the project), sprites used in the
project appear as follows:

52

media

51

1-The name of the sprite (you can

modify it by clicking on it and
renaming it).

2-The location of the sprite and

determines it (the horizontal axis
is the X values and the vertical
axis is the Y values, note the
current location of the sprite (cat)
on the platform is ((60,0)

3-The direction of the sprite’s

movement: (You can change the
direction by changing the
Direction value).

4-Show or hide the sprite on the

platform.

5-The size of the sprite and its value

can be changed.

6-Delete the sprite from the

platform.

7-Add a new sprite Choose Sprite.

Activity:

With the help of your teacher, make the following changes to the Sprite:

1- The name of the sprite (you can modify it).

2- The location of the sprite on the platform is (100,80(

3- The direction of the sprite’s movement.

4- Show or hide the sprite from the platform.

5- The size of the sprite to the value 50.

6- Delete the sprite from the platform.

7- Add a new sprite.

53

media

52

Add a new sprite:

To add a new sprite in the
sprites area

-Click on Choose Sprite

Select Basketball

-Remove the cat sprite from the
stage

54

media

53

Project 2:

Required to move the ball randomly on the platform while making a sound
for the ball and repeating this 10 times

Project creation steps:

1-From Motion

2-Choose the Go to random position command

3-From Sound
4-Choose the command Play sound

55

media

54

5-To repeat the movement 10 times from Control
6-Choose the Repeat command.

To execute the
project

7-From Events

8-Choose the
When Clicked
command

Test the
execution of
the project

56

media

55

Project (3) Spaceship

-Insert a new sprite Rocketship

57

media

56

-Remove the cat sprite from the stage.

58

media

57

-Insert a new background by clicking on Choose a Backdrop, browse through
the different backgrounds and then choose “Space”.

59

media

58

Activity:
With the help of your teacher and in cooperation with your colleagues, do the
following:
Make the spaceship move randomly, make a sound for the spaceship, change
the size of the spaceship, repeat this 5 times, make the spaceship’s location on
the platform start from (0, 0)

60

media

59

Implement Project 3

Activities and Projects:

With the help of your teacher and in cooperation with your classmates, do the
following:

Square Drawing Project:

1.Open a new project: Open Scratch and start a new project.
2.Select the pen: We will use the "pen" to draw our picture. In the code area,

find the "pen" section and drag the "pen" block down. This block will make the
pen start drawing.

Note: Click on Add

Extension and the pen

Blocks will appear as shown in the opposite figure:

3.Setting Color and Size: Before you start drawing, you can set the

line color and size using the blocks in the “Pen” section. For example,
you can use the “Set Pen Color to” block to choose a specific color, and the
“Set Pen Size to” block to set the line thickness.

4.Moving the Pen: Now, we will move the pen to draw the shape we want. Use

the “Go to x:y:” block to set the starting point, and then use the “Go to x:y:”
block again to set the ending point. This will make the pen draw a straight line
between the two points.

5.Repeating Steps: Repeat the previous steps to draw more lines and

form the shape you want.

Notes:

Drawing different shapes: You can draw any geometric shape by setting

the start and end points of the lines appropriately.

Adding details: You can add details to your image such as eyes, mouth, and

ears.

Project: Drawing a circle

To draw a circle, you can use the "Repeat" block to repeat the process of drawing
short lines at different angles, this helps with the circle drawing effect.

61

media

60

Learn by doing

Put a check mark () in front of the correct sentence and a check mark () in
front of the incorrect sentence.

1.The sprites used in the project appear in the Sprites area. ( )
2.The sprite name can be modified only once. ( )
3.The location of the sprite on the platform is determined by the value

of the horizontal axis X only. ( )

4.The horizontal and vertical axis are used to know the current location

of the sprite on the platform. ( )

5.To modify the name of the sprite, click on its current name and

rename it. ( )

6.The direction of the sprite’s movement can be changed by clicking

on the word Direction. ( )

7.The sprite can be shown or hidden on the platform by clicking on

Choose Sprite. ( )

8.The size of the sprite is changed by its value in the Sprites area. ( )
9.The sprite can be deleted from the platform. ( )
10.Only one sprite can be added to the platform. ( )
11.To add a new sprite, click on Choose Sprite. ( )
12.The Stop command is used to watch the project execution. ( )
13.A new background is inserted for the project through the

programming area. ( )

14.The Start command is used to stop the project. ( )
15.We use the coordinates (x, y) to locate the point on the stage. ( )

Self-assess

Go to the objectives at the beginning of the lesson.

Check the correct, I can........ box.

62

media

61

63

media

62


Lesson 6 Principles of Python

Objectives:

By the end of the lesson, I will
be able to:

After the lesson, check the correct box:
I can...

- Explain the concept of the
Python programming language
Very good
Ok
Need more work

- List the uses of the Python
language
Very good
Ok
Need more work

- Practice the steps to download
the Python language to my deviceVery good
Ok
Need more work

Engage:

What is Python programming language? How can the application be
downloaded from the official website?

Learn

What is Python:

Before we start defining Python, we must know that the first version of the
language was in 1991. It is a programming language widely used in data science
and machine learning, and for developing websites and applications.

Features of Python:

1.Open source: Python is free and open source, allowing everyone to use and

develop it.

2.Interpreted language: Which means that it translates programming codes line

by line, so if there are errors in the program code, it will stop working, as
programmers can quickly find errors in the codes.

3.Versatility: It can be used in developing web applications, data science,

artificial intelligence, machine learning, and game programming.

64

media

63

4.Easy-to-use language: It is one of the easiest programming languages for

beginners because of its simple and organized formula and uses words similar

to English, unlike other programming languages.

5.Integration: Python can be integrated with other languages such as C, C++,

and Java, and it can also be used in developing multi-platform programs.

6.Libraries: Python has many libraries that you can use.

Python Libraries

They are pre-built codes and functions that help programmers perform specific
tasks without having to write codes from scratch, libraries are a powerful tool
that increases the efficiency and effectiveness of programming using Python, as
they provide ready-made solutions to many common problems or requirements.

like:

NumPy: is a library widely used in data science, statistics, and artificial
intelligence.

Pandas: is a library for analyzing and processing data.

Matplotlib: is a library for creating graphs and charts

65

media

64

How to download the program from the official website:

1-Visit the official Python websitewww.python.org

2-Choose “Download”

66

media

65

3-Then choose the system you are working on (Windows, Mac, or Linux).

4-You must choose 64 bit or 32 bit, according to your device specifications.

67

media

66

5-After downloading, install the program on your device and follow the

instructions.

Self-assess

Go to the objectives at the beginning of the lesson.

Check the correct, I can........ box.

68

media

67

Learn by doing

Put a check mark () in front of the correct sentence and a check mark () in
front of the incorrect sentence.

1.Python is a free and open-source language, which does not allow anyone

to develop it. ( )

2.It is not permissible to create applications and websites in Python. ( )
3.Python uses data science and machine learning. ( )
4.Python is an interpreted language because it translates programming

codes line by line. ( )

5.Python is used in developing web applications, data science, artificial

intelligence, machine learning, and game programming. ( )

6.Python is one of the most difficult programming languages. ( )
7.Python can be integrated with other languages such as C, C++, and Java. ( )
8.One of the disadvantages of Python is the lack of libraries that you

can use. ( )

9.NumPy: A library used in data science, statistics, and artificial

intelligence. ( )

10.Pandas: A library for analyzing and processing data. ( )

-Download Python from the official website and arrange the following steps

in the correct order.

1-You must choose 64bit or 32bit, depending on your device specifications.
2-Visit the official Python website www.python.org
3-Choose the system you are working on (Windows, Mac, or Linux).
4-After downloading, install the program on your device and follow the

instructions.

5-Choose "Downloads"

69

media

68

70

media

69

Lesson7 Variables in Python


Objectives:

By the end of the lesson, I will
be able to:

After the lesson, check the correct box:
I can...

- Explain the concept of variablesVery good
Ok
Need more work

- Deduce the types of variables

Very good
Ok
Need more work

- Write a simple programming
code in Python
Very good
Ok
Need more work

Engage:

What are variables in programming languages? How can they be written and
classified?

Learn

Variables in programming languages express a reserved place in memory to store

and save a specific value, where the value can change (example: Taher= 20) In this

example, we expressed a variable named (Taher) and its value is equal to (20),

where you can change the value of the variable while dealing with the program

immediately during the execution of the program.

Conditions for naming variables in Python:

1.The variable name begins with a letter or an underscore _.
2.The change name contains letters (A-Z) or numbers or an underscore _
3.Reserved words may not be used in Python because they express specific values

that the program understands (example: False) A reserved word within the
program is a word that indicates a reserved value (logical value).

71

media

70

Dear student… When writing a variable name, you must take into account placing
the variable names in upper and lowercase letters (example: TAHER, Taher, taher,
TaheR) In the previous example, the variable names refer to four variables and not
one variable.

Types of variables in Python

1- Numbers: Used to store numerical values such as integers (int) and decimals

(float).

Integer variables:

X= 5

Y= 10

Decimal variables:

Z= 5.25

A= 8.32

2- Strings: Used to store texts such as names and addresses.

Texts are placed between single quotes ‘ ’ or double quotes “ ”

Name = “Taher”

City = ‘Cairo’

3- Booleans: A data type that contains only two values True or False

Often used in comparisons and decision making in codes

Is_taher_student = False

Is_taher_a_teacher = True

72

media

71

Python program interface

1- Through the interactive Python interface (Python Shell): You can write

simple codes and execute them directly to see the results.

2- Text editor: It allows you to write longer and more complex

codes and save them to run later.

The interactive Python interface is installed when you install the Python
language, and there is no need to download it, unlike a text editor that must
be downloaded from the Internet, such as Visual Studio and PyCharm.

To know the type of the variable you can use the type ( ) function

73

media

72

Simple Python Code Using Variables

The print function ( ) in Python is one of the most commonly used functions,
used to display text or values on the output screen. It can be used to display
text, variables, or even the results of mathematical operations.

Self-assess

Go to the objectives at the beginning of the lesson.

Check the correct, I can........ box.

74

media

73

Learn by doing

Put a check mark () in front of the correct sentence and a check mark () in
front of the incorrect sentence.

1.Variables in programming languages are a reserved place in memory to store

and save a specific value. ( )

2.The variable name must not begin with a letter or an underscore sign _. ( )
3.TAHER, Taher, taher, TaheR are 4 names for variables in the Python

language. ( )

4.The change name contains letters (A-Z) or numbers or an underscore

sign _. ( )

5.When naming variables, reserved words in the Python language may be

used. ( )

6.Y= 10 The statement type of the variable Y is numeric for an integer. ( )
7.City = “Cairo” The statement type of the variable City is text. ( )
8.Is_taher_student = False The statement type of the variable Is_taher_student is

logical. ( )

9.To know the type of the variable, we do not need to use the type ( )

function. ( )

10.The texts of variables are placed between single quotation marks ‘ ’ or

double quotation marks “ ”. ( )

-Choose the correct answer from the following.
1. The function ..... is used to display texts or values on the output screen

A.Cos( )

B.Type( ).

C.Print( ).

D.Sin( ).

75

media

74

2. The text value of the variable is placed between the signs .....

A.""

B.<>.

C.>=.

D.=<.

3. To display texts, variables, or even the results of mathematical operations,

we use the function .....

A.Cos( )

B.Type( ).

C.Print( ).

D.Sin( ).

4. To know the type of the variable statement, we use the function .....

A.Cos( )

B.Type( ).

C.Print( ).

D.Sin( ).

76

media

75

Translation committee

Mr.Mostafa Zaghloul Ahmed

Central General supervisor of technical Education

Dr. Ghada Elsayed Mohamed

English Language curriculum Expert

Dr.Amira fawzy Ahmed

Head of English Language Department

media

0

Computer & Information

Show answer

Auto Play

Slide 1 / 76

SLIDE