Iteration involves repeatedly moving data from one set to another while performing a specific action each time. For example, if you have a pile of cards, you can iterate through each card, perform a specific action (e.g., increment a counter), and move the card to a new pile.
Filtering involves selecting specific data from a larger dataset based on certain conditions. For instance:
Multiple filtering applies more than one condition to filter data. For example, to get the number of female students from Chennai, you filter by gender (female) and then by city (Chennai).
Flowcharts are pictorial representations of algorithms with different types of boxes:
Data types categorize the kinds of values that variables can hold:
Integer: 6
Character: 'a'
String: "Rahul"
Boolean: True or False
Boolean variables can be used in logical operations:
Integers can range from negative infinity to positive infinity. Operations include addition, subtraction, multiplication, and division. Comparisons yield Boolean results.
Characters include letters (A-Z, a-z) and digits (0-9), and special characters (@, #, $, etc.). Operations are limited to comparisons.
Strings are sequences of characters enclosed in quotations. Operations include comparisons and concatenations.
Sub data types are specialized versions of basic data types with limited ranges:
Sequence Number: 0, 1, 2, ..., 29
Marks: Any value between 0 and 100
int x = 5;
char c = 'a';
String s = "hello";
boolean flag = true;
if (condition1 && condition2) {...}
if (condition1 || condition2) {...}
int sum = a + b;
int diff = a - b;
if (a < b) {...}
1. What does iteration involve?
Answer: a
2. Which of the following is an example of filtering?
Answer: a
3. What does a rectangular box in a flowchart represent?
Answer: c
4. What are the possible values for a Boolean data type? strong>
Answer: b
5. Which of the following is a sub data type?
Answer: d
6. What operation can be performed on a character data type?
Answer: c
7. What is the range of integer data types?
Answer: c
8. What symbol is used for an 'AND' operation in Boolean logic?
Answer: b
9. What is a flowchart used for?
Answer: c
10. Which data type would you use for a sequence number?
Answer: c