Class 11 Computer Science Project
Q1. Theory
1. What is Python?
Python is a high-level, interpreted programming language developed by Guido van Rossum.
Features: Easy to learn, Interpreted, Portable, Open-source.
2. Tokens
Tokens are the smallest units of a Python program. Types: Keywords, Identifiers, Literals,
Operators, Delimiters.
3. Keywords vs Identifiers
Keywords are reserved words; identifiers are names given by programmers.
4. Variables
Variables store data. Example: age=16, name='Rahul'.
5. input() and print()
input() takes user input. print() displays output.
Q2. Python Programs
1. Sum, Difference, Product, Division
a=float(input('Enter first number: '))
b=float(input('Enter second number: '))
print('Sum =',a+b)
print('Difference =',a-b)
print('Product =',a*b)
print('Division =',a/b)
2. Area of Circle
r=float(input('Enter radius: '))
area=3.14*r*r
print('Area =',area)
3. Even or Odd
n=int(input('Enter number: '))
if n%2==0:
print('Even')
else:
print('Odd')
4. Largest of Three
a=int(input())
b=int(input())
c=int(input())
if a>=b and a>=c:
print(a)
elif b>=a and b>=c:
print(b)
else:
print(c)
5. Grade
m=int(input('Enter marks: '))
if m>=90:
print('Grade A')
elif m>=75:
print('Grade B')
elif m>=50:
print('Grade C')
else:
print('Fail')