CBSE Class 6 Computer NCERT
CBSE Class 6 Computer NCERT
1. What is a flowchart?
2. What is a pseudocode?
Flowline (arrow)
4. What is an algorithm?
o A decision is a point where the flow of the program can take different paths
based on a condition.
For loop
While loop
Do-while loop
Start
End
o Integer
o Float
o String
o Boolean
o Arithmetic operators
o Comparison operators
o Logical operators
o Assignment operators
You use the # symbol to write a single-line comment and triple quotes (''') for
multi-line comments.
Input: The input() function is used to take input from the user. It reads a line of
text from the console and returns it as a string.
Python
Python
Python
if-else statement: Executes one block of code if a condition is true, and another
block if it's false.
Python
else:
Python
else:
Loops in Python
Python
for i in range(5):
print(i)
Python
i=0
while i < 5:
print(i)
i += 1
Functions in Python
Python
def greet(name):
greet("Alice")
Recursion
It's often used to solve problems that can be broken down into smaller, similar
subproblems.
Key concepts:
Python
try:
y = 10 / x
print(y)
except ZeroDivisionError:
File Handling
Reading files: Use the open() function to open a file and the read() method to
read its contents.
Writing files: Use the open() function with the 'w' mode to create a file and the
write() method to write to it.
Regular Expressions
The re module in Python provides functions for working with regular expressions.
Executing SQL queries: Use the execute() method to execute SQL queries.
Fetching results: Use the fetchall() or fetchone() methods to fetch results from
the database.
Frameworks: Django and Flask are popular frameworks for web development in
Python.
Applications:
o Predictive analytics
o Computer vision
Python is widely used for AI and machine learning due to its simplicity and
powerful libraries.
Future of Python
Data analysis
Web development
Game development
Education