Page 110 - 2502_Pakistan-kifayat_C-7
P. 110
• or: Returns true if either condition is true.
• not: Returns true if the condition is false, and vice versa.
Other Operators: Some other operator blocks are:
• join: Combines two strings of text into one.
• letter of: Returns a specific letter from a string based on the given
position.
• length of: Returns the number of letters in a string or the number of
items in a list.
• contains: Checks if a string includes a specific substring and returns
true or false.
• mod: Returns the remainder when one number is divided by another.
• round: Rounds a number to the nearest whole number.
• abs: Returns the positive value of a number, ignoring its sign.
Double Tap Century #Technology Literacy
21 st
Skills
Write the answer as True or False. Consider the AND and OR as logical operators.
1. (I am a girl) AND (I am 9 years old)
2. (I am a girl) OR (I am 9 years old)
3. (I am a boy) AND (I am 9 years old)
4. (I am a boy) OR (I am 9 years old)
5. (I am in Grade V) AND (I live in India)
CONDITIONS USING OPERATORS
In Scratch, conditions are rules or checks that help control what your program should do under
certain circumstances. They make your project interactive and responsive by checking values (like
score or timer) or events (like sprite collision).
A condition is a statement that evaluates to either true or false. Based on this, Scratch decides whether
or not to run certain blocks of code.
Example 1: If the player’s score is greater than 10, show a ‘You win!’ message.
These conditions use comparison operators to compare two values. They are essential when you
want to check:
Has the player reached a certain score?
108 Premium Edition-VII

