Artificial Intelligence and Programming
Artificial Intelligence and Programming
Lesson 2
Lesson I
Sensors
Artificial Intelligence Applications
By the end of the lesson, I will be able to :
By the end of the lesson, I will be able to :
1. Mention the different types of sensors and
I. List types of artificial intelligence
their areas of use
2. Review some practical applications of
2. List the importance of sensors in our modern life
artificial intelligence
3. Design a simple project based on the idea of
3. Suggest the largest number of ideas for the
sensors
uses Of artificial intelligence in our lives
Lesson 4
Lesson 3
Scratch
Robot
By the end of the lesson, I will be able to :
By the end Of the lesson, I Will be able to :
I. Explain the uses Of the Scratch program
I. Explain the concept Of robot
2. Deduce the features of the Scratch program
2. List the types of robots and their functions
3. Use the Scratch program to create a simple
3. Suggest the largest number of ideas for the
project
uses of robots in our lives
Lesson 6
Lesson 5
Principles of Python
Sprites Area in Scratch
By the end of the lesson, I will be able to :
By the end of the lesson, I will be able to :
1. Explain the concept of the Python
1. Discuss the concept of sprites area in Scratch
programming language
2. Create a simple project in Scratch and its role
2. List the uses of the Python
in our lives
language
3. Develop my project (add-delete-modify) for
3. Practice the steps to
sprites on the project
download the Python
Lesson 7 language to my device
Variables in Python
Lesson One
Artificial Intelligence Applications
Lesson Two
Sensors
Lesson Three
Robot
Lesson Four
Scratch
Lesson Five
Sprites Area in Scratch
Lesson Six
Principles of Python
Lesson Seven
Variables in Python
Lesson One
Artificial Intelligence Applications
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.
➢ Narrow 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.
➢ General 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.
➢ Super 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.
Applications of artificial intelligence in daily life:
1- 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.
2- 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.
3- 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.
6- 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:
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
Model Building Training:
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 website https://teachablemachine.withgoogle.com/"
Home screen layout of the site
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.
• 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.
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.
• Camera: Point the camera at your hand and perform the movements you trained.
• Results: 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.