0% found this document useful (0 votes)
3 views3 pages

Class 11 Python Full Guide

This document is a complete guide to Python for Class 11, covering fundamental concepts such as variables, data types, operators, input/output, conditional statements, loops, strings, lists, tuples, and dictionaries. It provides examples for each topic to illustrate how to use Python effectively. The guide serves as an introduction to programming in Python, making it accessible for beginners.

Uploaded by

hhe033000
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Class 11 Python Full Guide

This document is a complete guide to Python for Class 11, covering fundamental concepts such as variables, data types, operators, input/output, conditional statements, loops, strings, lists, tuples, and dictionaries. It provides examples for each topic to illustrate how to use Python effectively. The guide serves as an introduction to programming in Python, making it accessible for beginners.

Uploaded by

hhe033000
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Class 11 Python – Complete Guide (Fundamentals

to Dictionaries)

1. Introduction to Python

Python is a high-level, interpreted, and easy-to-learn programming language.


Example:
print("Hello, World!")

2. Variables and Data Types

x = 10 # int
y = 3.14 # float
name = "Rishi" # string
is_student = True # boolean

3. Operators

a = 10
b = 3
print(a + b)
print(a - b)
print(a * b)
print(a / b)
print(a % b)
print(a ** b)

4. Input and Output

name = input("Enter your name: ")


age = int(input("Enter your age: "))
print("Name:", name)
print("Age:", age)

5. Conditional Statements

x = int(input("Enter a number: "))


if x > 0:
print("Positive")
elif x < 0:
print("Negative")
else:
print("Zero")

6. Loops

# for loop
for i in range(1, 6):
print(i)

# while loop
i = 1
while i <= 5:
print(i)
i += 1

7. Strings

s = "Python"
print(s[0])
print([Link]())
print([Link]())
print(s[0:4])

8. Lists

marks = [90, 85, 78, 92]


[Link](88)
[Link](78)
print(marks)
print(len(marks))

9. Tuples

t = (10, 20, 30)


print(t[1])
# tuples are immutable

10. Dictionaries

student = {
"name": "Rishi",
"class": 11,
"marks": 92
}
print(student["name"])
student["marks"] = 95
student["school"] = "ABC School"
print(student)

You might also like