0% found this document useful (0 votes)
5 views28 pages

Python file 2-3

This document is a final project report submitted by Rishvi Mishra for Class 10A, guided by Mrs. Chandana Channappa, fulfilling the CBSE curriculum for the academic year 2024-2025. It includes various coding exercises in Python, covering topics such as variable assignment, data type conversion, arithmetic operations, loops, and conditional statements. The report also contains acknowledgments and a certification section confirming the completion of the project.

Uploaded by

amanmishrasan
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)
5 views28 pages

Python file 2-3

This document is a final project report submitted by Rishvi Mishra for Class 10A, guided by Mrs. Chandana Channappa, fulfilling the CBSE curriculum for the academic year 2024-2025. It includes various coding exercises in Python, covering topics such as variable assignment, data type conversion, arithmetic operations, loops, and conditional statements. The report also contains acknowledgments and a certification section confirming the completion of the project.

Uploaded by

amanmishrasan
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
You are on page 1/ 28

FINAL REPORT FILE

Submitted By : Rishvi Mishra


Submitted To : Chandana Channappa
Grade : 10A
Academic year : 2024-2025
CERTIFICATE

This is to certify that this project had been successfully completed by Rishvi Mishra of Class 10A under the
guidance of Mrs. Chandana Channappa, in particular fulfillment of the curriculum of Central Board of Secondary
Education (CBSE) leading to the award of annual examination of the year 2024-2025.

_________________ _____________________
Signature of the Teacher Signature of the Principal

___________________________ ____________________________
Signature of the Internal Examiner Signature of the External Examiner

Date: 15 November 2024

Address: Tokyo, Japan, GIIS Tokyo

Page 1 of 26
ACKNOWLEDGEMENT

At the very outset I am very much grateful to our beloved and respected teacher Mrs. Chandana Channappa for her

kind support and guidance that she has been providing during the preparation of this Project.

I express my sincere gratitude to the principal of GIIS, Tokyo for her kind guidance in this project.

Student name: Rishvi Mishra

Student of Class: 10A

Page 2 of 26
INDEX
1.Write a code to assign value 15 to the variable ‘s’

2.Write a code to convert the integer 11 into a float value .

3.Write a code to convert the float value 11.26 to integer number .

4.Write a code to make a list with 3 states and one numerical


value.

5.Write a code to make a tuple with different boy names.

6.Write a code to make a union of some whole numbers .

7.Write a code to make and intersection of the same variables (X


and Y)as above .

8.Write a code to list the difference between variables X and


Y of values 10-14 and 13-17 respectively.

9.Write a code to list the symmetric difference of the variables X


and Y of value 11-15 and 14-18 respectively.

10.Write a code to add 5649 and 22345. 11.Write a code to

Page 3 of 26
subtract 2999 from 466850.

12.Write a code to multiply 123456789 and 987654321.

13.Write a code to divide 2424 by 2.

14.Write a code to list the remainder after dividing 34567 from 3 .

15.Write a code to list the value of 58648 raised to power 9.

16.Write a code to use all arithmetic operations in a single


question with variables a,b and c of values 10,8 and 0
respectively.

17.Write a code to use all Conditional operators in a single


question with A and B of value 100 and 80 respectively.

18.Write a code to use the logical operators .

19.Write a code to write a code for finding perimeter and area of a rectangle
with length and breadth of measurements 62 cm and 26 cm respectively.

20.Write a code to give a code with membership operators.

21.Write a code to code using Identity operators.

22.Write a code with ‘elif’ and variables X and Y of values 10 and

Page 4 of 26
12 respectively.

23.Write a while loop code .

24.Write a nested loop code.

25.Karry was reading a book today. She did not know a certain word
meanings and now wants to make a dictionary with them to help her get the
meaning of them in a instant .Help her by
making the dictionary on python.

26.Create a tuple to tell the name,age and grade for Riya,who is a 15 year
old,9th grader.Also access and unpack the tuple.

27.Check if an element exists in a tuple, consisting of apple,banana,orange


and pear,or not.

28.Neena is writing a program to print numbers from 1 to 9. However, Neena


wants to stop the printing process when the number 7 is reached. She also
wants to print all odd numbers from 1 to 14, skipping the even numbers.
Help Neena by writing codes to achieve these.

29.Write a program for allotting Grades based on scores,to a student named


Alina,if her score was 85.

30.Print a double triangular pattern using nested loops.

Page 5 of 26
1.Write a code to assign value 15 to the variable ‘s’

Code:
s=15
print(s)

Output:

2.Write a code to convert the integer 11 into a float value .

Code:
A=11
B=float(A)
print(B)
Output:

Page 6 of 26
3.Write a code to convert the float value 11.26 to integer number .

Code:
A=11.26
B=int(A)
print(B)

Output:

4.Write a code to make a list with 3 states and one numerical


value.
Code:

States =['Punjab','haryana','west bengal',28]


print(States)

Output:

Page 7 of 26
5.Write a code to make a tuple with different boy names.

Code:
names=('karthik','sahil','himanshu')

print(names)

Output:

6.Write a code to make a union of some whole numbers .

Code:
X={10,11,12,13}
Y={12,13,14,15}
print(X|Y)

Output:

Page 8 of 26
7.Write a code to make and intersection of the same variables (X
and Y )as above .

Code:
X={10,11,12,13}
Y={12,13,14,15}
print(X&Y)

Output:

8.Write a code to list the difference between variables X and Y


of values 10-14 and 13-17 respectively.

Code :
X={10,11,12,13,14}.
Y={13,14,15,16,17}
print(X-Y)

Output:

Page 9 of 26
9.Write a code to list the symmetric difference of the variables X
and Y of value 11-15 and 14-18 respectively.

Code:

X={11,12,13,14,15}
Y={14,15,16,17,18}
print(X^Y)

Output:

10.Write a code to add 5649 and 22345.

Code:
A=5649
B=22345
print(A+B)

Output:

Page 10 of 26
11.Write a code to subtract 2999 from 466850.

Code :

A=2999
B=466850
print(B-A).

Output:

12.Write a code to multiply 123456789 and 987654321.

Code:
A=123456789
B=987654321
print(A*B)

Output:

Page 11 of 26
13.Write a code to divide 2424 by 2.

Code:
A=2424
B=2
print(A/B)

Output:

14.Write a code to list the remainder after dividing 34567


from 3 .

Code:
A=34567
B=3
print(A%B)

Output:

Page 12 of 26
15.Write a code to list the value of 58648 raised to power 9.

Code:
A=58648
B=9
print(A**B)

Output:

16.Write a code to use all arithmetic operations in a single question


with variables a,b and c of values 10,8 and 0 respectively.

Code:
a=10
b=8
c=0
c=a+b
print(c)
c=a-b
print(c)
c=a*b
print(c)
c=a/b

Page 13 of 26
print(c)
c=a%b
print(c)
c=a**b
print(c)

Output:

17.Write a code to use all Conditional operators in a single


question with A and B of value 100 and 80 respectively.

Code:
A = 100
B = 80
if A == B:
print("A is equal to B")
else:
print("A is not equal to B")
if A != B:
print("A is not equal to B")
else:
print("A is equal to B")

Page 14 of 26
if A < B:
print("A is less than B")
else:
print("A is not less than B")
if A > B:
print("A is greater than B")
else:
print("A is not greater than B")

Output:

18.Write a code to use the logical operators .

Code:
X=True
Y=False
print('X and Y is',X and Y)
print('X or Y is',X or Y)
print('not X is',not X)

Page 15 of 26
Output:

19.Write a code to write a code for finding perimeter and area of a rectangle
with length and breadth of measurements 62 cm and 26 cm respectively.

Code:
length = 62
breadth = 26
perimeter = 2 * (length + breadth)
area = length * breadth
print("Perimeter of the rectangle:", perimeter, "cm")
print("Area of the rectangle:", area, "square cm")

Output:

Page 16 of 26
20.Write a code to give a code with membership operators.

Code:
my_list = [1, 2, 3, 4, 5]
output_1 = 3 in my_list
output_2 = 6 in my_list
print(output_1)
print(output_2)
Output:

21.Write a code to code using Identity operators.

Code:

X1='Welcome to GIIS!'
X2=1234
Y1='Welcome to GIIS!'
Y2=1234
print(X1 is Y1)
print(X1 is not Y1)
print(X1 is not Y2)
print(X1 is X2)

Page 17 of 26
Output:

22.Write a code with ‘elif’ and variables X and Y of values 10 and 12


respectively.

Code:
X = 10
Y = 12
if X < Y:
print('X is less than Y')
elif X > Y:
print('X is greater than Y')
else:
print('X and Y are equal')

Output:

Page 18 of 26
23.Write a while loop code .

Code:
count=0
while(count<10):
print(count)
count=count+1
print("Thank You!")

Output:

Page 19 of 26
24.Write a nested loop code.

Code:
count=1
for i in range(10):
print(str(i)*i)
for j in range(0,i):
count=count+1

Output:

Page 20 of 26
25.Karry was reading a book today. She did not know a certain
word meanings and now wants to make a dictionary with them to
help her get the meaning of them in a instant .Help her by
making the dictionary on python.
a)chockablock - at point of overflow
b)Mordant-sarcastic
c)Polymecize-to engage in a contentious debate
d) Agog-state of eager anticipation e)Resplendent
-richly colourful

Code:
word_meanings =
{ "chockablock": "at point of overflow", "mordant": "sarcastic",
"polemicize": "to engage in a contentious debate",
"agog": "state of eager anticipation", "resplendent": "richly
colourful" }
print("Word meaning of 'agog':",
word_meanings["agog"])

Output:

Page 21 of 26
26.Create a tuple to tell the name,age and grade for Riya,who is a
15 year old,9th grader.Also access and unpack the tuple.

Code:
student=('Riya',15,'9th Grade')
print(student)

name=student[0]
age=student[1]
grade=student[2]
print(name,age,grade)

student=('Riya',15,'9th grade')
name,age,grade=student
print(name)
print(age)
print(grade)

Output:

Page 22 of 26
27.Check if an element exists in a tuple, consisting of
apple,banana,orange and pear,or not.

Code:
fruits=('apple','banana','orange','pear')
contains_apple='apple' in fruits
print(contains_apple)
contains_pear='pear' in fruits
print(contains_pear)

Output:

Page 23 of 26
28.Neena is writing a program to print numbers from 1 to 9.
However, Neena wants to stop the printing process when the
number 7 is reached. She also wants to print all odd numbers from
1 to 14, skipping the even numbers. Help Neena by writing codes
to achieve these.

Code:
for i in range(1,10):
if i==7:
print("Loop finishing early!")
break
print(i)
for i in range(1,15):
if i%2==0:
continue
print(i)

Output:

Page 24 of 26
29.Write a program for allotting Grades based on scores,to a student named
Alina,if her score was 85.

Code:
score=85
if score>=90:
grade="A"
elif score>=80:
grade="B"
elif score>=70:
grade="C"
else:
grade="D"
print("Alina's grade is:",grade)

Output:

Page 25 of 26
30.Print a double triangular pattern using nested loops.

Code:
rows=5
for i in range(rows):
for j in range(i+1):
print("*",end=" ")
print()

for i in range(rows,0,-1):
for j in range(i-1):
print("*",end=" ")
print()

Output:

Page 26 of 26
Page 27 of 26

You might also like