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

Class 11 Computer Science Project

The document provides an overview of Python, including its definition, features, and basic concepts such as tokens, keywords, identifiers, and variables. It also includes several Python programs demonstrating operations like sum, area calculation, even/odd checking, finding the largest of three numbers, and grading based on marks. Each program is accompanied by user input prompts and output statements.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Class 11 Computer Science Project

The document provides an overview of Python, including its definition, features, and basic concepts such as tokens, keywords, identifiers, and variables. It also includes several Python programs demonstrating operations like sum, area calculation, even/odd checking, finding the largest of three numbers, and grading based on marks. Each program is accompanied by user input prompts and output statements.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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')

You might also like