Class 6th....... (First Term PDF
Class 6th....... (First Term PDF
Class:
Sec:
Roll No:
Artificial Intelligence
Class 6th – First Term - 2025-26
Topic – 1: Introduction to Coding and Programming in PictoBlox
➢ What is Coding?
• Coding is the process of writing instructions that a computer can understand and execute.
• These instructions are called programs and are written using programming languages like Python,
Java, and block-based languages such as PictoBlox.
➢ Why is Coding Important?
• Coding helps create websites, apps, and games.
• It allows automation of tasks using Artificial Intelligence (AI).
• It improves problem-solving and logical thinking skills.
➢ Types of Coding
1. Text-Based Coding – Uses written commands (Example: Python, C, Java).
2. Block-Based Coding – Uses drag-and-drop blocks (Example: PictoBlox).
➢ Basic Coding Concepts
1. Algorithm – A step-by-step solution to a problem.
2. Sequence – The order in which instructions are given.
3. Loops – Repeating a set of instructions (Example: Repeat 10 times).
4. Conditionals – Making decisions in coding (Example: If the score is 10, show "You Win").
5. Variables – Store values that can change (Example: Score = 0, then Score = 10).
➢ What is PictoBlox?
• PictoBlox is a block-based coding platform that helps students learn programming and AI easily.
• It allows users to create animations, games, and AI-based projects.
➢ Features of PictoBlox
• Block-Based Programming – Uses colorful blocks to create programs.
• AI and Machine Learning – Can recognize objects, faces, and speech.
• Hardware Integration – Works with Arduino, Quarky, and sensors.
• Stage and Sprites – You can create and control characters (Sprites).
➢ Getting Started with PictoBlox
1|Page
Practice Activities
✓ Activity- Create a Talking Sprite
1. Select a Sprite.
2. Use "Say Hello for 2 seconds" block.
3. Click the Green Flag and watch the Sprite speak!
PictoBlox is a graphical programming software based on Scratch blocks and is the ideal companion for setting
the first step into the world of programming. Its user-friendly interface and drag-and-drop functionality
eliminate the need to memorize syntax and rules that make traditional programming languages difficult.
➢ PictoBlox Interface
1. Stage
The stage is a background or a backdrop for your Scratch projects (the programs you’ll create). It is a white
background in the top left corner; you will see a bear standing there. His name is Tobi and he is what is called
a sprite (we’ll see in a moment what it is). The Stage is where the sprite moves, draws, and interacts with other
sprites and/or hardware. It has its own set of scripts, images, and sounds.
2|Page
2. Sprite
A Sprite is an object or a character that performs different actions in projects. It understands and obeys
the instructions that you’ll give them on your projects. It can move and can be moved to any place in
the stage (you can try by clicking on them and moving them around).
3. Blocks
Block is like jigsaw puzzle pieces that fit into each other. They are predefined commands used to create
programs by simply dragging and dropping them below one another in the scripting area.
4. Script
A script is a program or a code in PictoBlox/Scratch lingo. It is a set of ‘blocks’ that are arranged below
one another in a specific order to perform a task or a series of tasks. The scripting area is where you
will create your scripts.
➢ Backdrops and Costumes in PictoBlox
In PictoBlox, we use Sprites (characters or objects) to create animations, games, and AI-based projects.
Each Sprite can have different costumes, and the stage can have different backdrops to make the project
look interesting.
➢ What is a Backdrop?
A Backdrop is the background of the stage where the sprites move and interact. It sets the theme of the
project.
➢ How to Add a Backdrop in PictoBlox?
1. Click on the Backdrop Button (bottom-right corner).
2. Choose a backdrop from the PictoBlox Backdrop Library OR
3. Click Paint to draw your own backdrop OR
4. Click Upload to add an image from your computer.
➢ Types of Backdrops:
• Indoor Scenes – Classrooms, Houses, Labs
3|Page
• Outdoor Scenes – Gardens, Space, Cities
• Custom Drawn Scenes – Create your own background
➢ How to Change Backdrop in a Program?
Use the "Switch Backdrop to [Backdrop Name]" block to change the background during the program.
Example: If making a story with a day and night scene:
• Start with a Day backdrop.
• After 5 seconds, switch to a Night backdrop.
➢ What is a Costume?
A Costume is a different appearance or outfit of a sprite. It helps in animation and movement.
➢ How to Change Costumes in PictoBlox?
1. Select the Sprite from the Sprite List.
2. Click on the Costumes tab at the top.
3. Choose a costume from the library, paint a new one, or upload an image.
➢ Types of Costumes:
• Different Poses – For walking, jumping, dancing
• Clothing Changes – Different outfits for characters
• Custom Drawn Costumes – Create your own design
➢ How to Change Costumes in a Program?
Use the "Switch Costume to [Costume Name]" block to change how a sprite looks.
Example:
• If making an animation of a running boy, switch between two different leg positions to show
movement.
Practice Activities
✓ Activity - Create a Scene with Changing Backdrops
Note - Now Combine these two codes to make the Tobi move and changing the background all together.
------------------------------------------------------------------------------------------
4|Page
Topic 2 – Basics of Algorithm, Flowchart and Pseudocode
➢ What is an Algorithm?
An algorithm is a step-by-step set of instructions to solve a problem.
Example: Making a cup of tea:
1. Boil water.
2. Add tea leaves.
3. Add milk and sugar.
4. Stir and serve.
➢ Why are Algorithms Important?
• It Helps in solving problems logically.
• It is used in programming to give instructions to a computer.
• It helps AI to make decisions.
➢ Characteristics of a Good Algorithm:
1. Clear and Precise – Every step should be well-defined.
2. Step-by-Step – Each instruction should be in sequence.
3. Has an Input and Output – It takes data (input) and gives a result (output).
4. Efficient – Should be easy to follow and solve the problem quickly.
➢ What is a Flowchart?
A flowchart is a diagram that represents an algorithm using different symbols. It helps in visualizing the
steps of a process.
➢ Flowchart Symbols:
5|Page
Example - Flowchart: Find the Largest of Two Numbers
➢ What is Pseudocode?
Pseudocode is a simplified way of writing an algorithm in plain English before converting it into a
programming language.
➢ Basic Rules of Pseudocode:
Uses Simple Language – No syntax, just logical steps.
Uses Common Keywords – START, INPUT, OUTPUT, IF, ELSE, WHILE, etc.
Easy to Understand – Helps in converting logic into code later.
START
INPUT Number1, Number2
Sum = Number1 + Number2
PRINT Sum
END
Practice Activities
✓ Activity 1: Make a Flowchart for Checking Even or Odd Number
Steps:
1. Start
2. Input a number
3. Check if the number is divisible by 2
o If YES, print "Even Number"
o If NO, print "Odd Number"
4. End
6|Page
✓ Activity 2: Write Pseudocode for a Simple Calculator
Steps:
1. Start
2. Input two numbers
3. Input an operation (+, -, *, /)
4. Perform the operation and display the result
5. End
➢ Benefits of using a flowchart
Some of the benefits of using a flowchart are:
1. It helps to explain your approach to solving a problem.
2. The flowchart helps in bringing in visual clarity to a problem, so it helps in practical problem-solving.
3. Once you build a flowchart, this remains as documentation of the code you are about to build. If you
need to come back and understand the code, you can refer to the flowchart.
7|Page
✓ Activity: Eligible for Vote
------------------------------------------------------------------------------------------
8|Page
Topic 3 – Getting Started with Quarky
Quarky is an electronic board with a lot of features using which you can make numerous exciting projects. You
can program Quarky to make expressions, play sounds, detect touch, and much more.
The Quarky Board is a powerful educational board designed for learning Artificial Intelligence (AI),
Robotics, and Programming in an easy and interactive way.
10 | P a g e
✓ Activity 2: Name Badge
------------------------------------------------------------------------------------------
11 | P a g e
Topic 4 – Variables and Operators
➢ What is a Variable?
A variable is a storage container in a program that holds data or values.
It can store numbers, text, or other types of information and can change while the program is running.
➢ Why are Variables Important?
Stores data that can be used later.
Makes coding easier by allowing reuse of values.
Can change values as needed in a program.
➢ Types of Variables
1. Global Variable – Can be used anywhere in the program.
2. Local Variable – Can be used only in a specific part of the program.
➢ Data Types in Variables
Data type identifies the type of data that the declared variable can hold is. Thus, it indirectly helps the
computer to understand what operations need to be performed on those variables.
Let us now understand what are the common data types that we can use in programming:
• Integer - Integer data type variables store integer values only. They store whole numbers which have
zero, positive and negative values but not decimal values.
• Floating-point number - Floating-point numbers are used to store decimal values. They hold real
numbers with decimal values.
• Character - Character type variables are used to store character values. The syntax of declaring a
character variable is specific to the programming language that you are using. If a user tries to create a
character variable and assign it with a non-character value, the program will throw an error. The
character data type is the smallest data type in programming.
• String - To extend the character data type, a user may have a requirement to store and perform an
operation on a sequence of characters. In such cases, the String data type is present to fit the gap. The
String data type stores value in a sequence of characters i.e. in String format.
• Boolean - There is a subtype of Integer Data Type called “Boolean Data Type”, which stores values in
Boolean type only i.e. “true” or “false”. Users can choose between the data types for variables as per
program needs and assign variables an appropriate data type.
➢ How to Create and Use Variables in PictoBlox
In PictoBlox, variables are used to store and manipulate data like numbers or text. You can create and use
variables by following these steps:
➢ Creating a Variable in PictoBlox
1. Open PictoBlox and go to the "Variables" category in the Blocks Palette.
2. Click on " Make a Variable " button.
3. Enter the name of your variable (e.g., "Score" or "Temperature").
4. Choose one of the options:
5. For all sprites (Global Variable) → Can be used in all sprites.
6. For this sprite only (Local Variable) → Can be used in only one sprite.
7. Click OK, and the variable will appear in the block section.
12 | P a g e
➢ Using Variables in PictoBlox
1. To assign a value to a variable, use the " set (Variable) to (Value)" block.
2. To update a variable, use the "change (Variable Name) by (Value)" block.
3. Click the checkbox beside the variable in the "Variables" section.
➢ Best Practices for Using Variables
1. Use meaningful names (e.g., Score, Speed, Distance).
2. Always initialize variables before using them.
3. Use Change Variable blocks to update values dynamically.
4. Hide unused variables to keep the stage clean.
➢ Introduction to Operators
Operators are symbols or commands that perform calculations, comparisons, or logical operations on
values and variables in a program.
They help in making decisions, performing arithmetic calculations, and handling conditions in coding.
➢ Why Are Operators Important?
• Perform calculations (e.g., addition, subtraction)
• Compare values (e.g., check if two numbers are equal)
• Make logical decisions (e.g., check if both conditions are true)
➢ Types of Operators in PictoBlox
In PictoBlox, operators are found in the "Operators" category. There are three main types:
+ Addition 5 + 3 = 8
- Subtraction 10 - 4 = 6
* Multiplication 7 * 2 = 14
/ Division 16 / 4 = 4
% Modulus (Remainder) 10 % 3 = 1 (Remainder when 10 is divided by 3)
2. Relational Operators (Used to compare two values; gives output as True or False)
13 | P a g e
3. Logical Operators (Used for decision-making in conditions)
AND True if both conditions are true (5 > 3) AND (8 > 2) → True
14 | P a g e
✓ Activity 2 – Addition Bot
------------------------------------------------------------------------------------------
15 | P a g e
Topic 5 – Conditional Statement & Nested Condition
➢ Introduction to Conditional Statements
Conditional statements help with decision-making in coding. They allow a program to execute different
actions based on conditions (true or false).
➢ Why Are Conditional Statements Important?
• Make decisions (e.g., If the light is red, stop)
• Control program flow (e.g., If the answer is correct, display "Well done!")
• Improve interactivity (e.g., If the sprite touches an object, it reacts)
16 | P a g e
✓ Activity 2 – Making Sprite Glide to multiple position
17 | P a g e
OR using Logical Operator
------------------------------------------------------------------------------------------
18 | P a g e
Topic 6 – Loops & Criterial in Loops
➢ Introduction to Loops
Loops are used in programming to repeat a set of instructions multiple times. Instead of writing the same
code again and again, we use loops to save time and avoid repetition.
➢ Why Are Loops Important?
Reduce repetition (e.g., Instead of writing "say Hello" 10 times, use a loop!)
Make programs efficient (e.g., Counting numbers from 1 to 100)
Allow animations and movements (e.g., Moving a sprite forward continuously)
In PictoBlox, loops can be found in the "Control" category.
➢ For Loop
• The "for" loop runs a fixed number of times.
• It is useful when we know how many times we want to repeat a task.
Example: Displaying numbers from 1 to 5
Criterial in Loops
➢ Nested Loop
Any loop in the program may contain another loop inside it. When there is a loop inside another
loop, it is called a nested loop. How it works is that the first success condition of the outer loop triggers
the inner loop which runs and reaches completion. This combination of loops inside the loop is helpful
while working with requirements where the user wants to work on multiple conditions simultaneously.
➢ Entry Criteria
Entry criteria are defined as a condition that must be met before starting a specific task. It is a set of
conditions that must exist before you can start a task. These criteria differ from program to program as per
the requirement.
➢ Exit Criteria
Exit criteria are defined as a condition that must be met before completing a specific task. It is a set
of conditions that must exist before you can declare a program to be complete.
19 | P a g e
➢ Break Statement
The break statement modifies the normal flow of execution while it terminates the existing loop and
continues the execution of the statement following that loop. A break statement is required as sometimes
you want to break out of a loop early when a condition is met.
➢ Continue Statement
Whenever a program comes across a continuous statement, the control skips the execution of remaining
statements inside the loop for the current iteration and jumps to the beginning of the loop for the next
iteration.
✓ Activity 1 – Printing Numbers from 1 to 9 on Quarky
------------------------------------------------------------------------------------------
20 | P a g e
Topic 7 – Touch Based Piano
Before we begin with our project, let’s have a look at our touch piano. As you know, Quarky has 5 touch
sensors, i.e. sensors that can detect if you’ve touched them.
• is () touched? block: The result of this block will be 0, or False, if we’re not touching the sensor. It will
be 1, or True, if we are touching it.
• when () is touched block: This block starts executing the script when the selected touch pin is touched.
Our touch-based piano will work like this: when we touch a particular sensor, then Quarky will play a note. The
note will be different for each sensor.
------------------------------------------------------------------------------------------
21 | P a g e
Topic 8 – Catch The Fruit Game
In this project, we’re going to make a game in PictoBlox! The aim of the game is to catch as many fruits as you
can with Tobi’s help and increase the score. The player with the higher score wins!
4. Click Tobi’s icon. Then, click the bin icon to delete it is already selected.
22 | P a g e
➢ Making the Monkey Move
Now it’s time to write the scripts for the “Monkey” sprite. Let’s begin!
------------------------------------------------------------------------------------------
23 | P a g e
Important Notes
24 | P a g e