0% found this document useful (0 votes)
37 views9 pages

ClassXI-Practical File Term 2

Uploaded by

Aditya shukla
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)
37 views9 pages

ClassXI-Practical File Term 2

Uploaded by

Aditya shukla
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
You are on page 1/ 9

SETH

HIRACHAND MUTHA SHAIKSHANIK


TRUST’S SETH HIRACHAND MUTHA SCHOOL
(CBSE) (SECONDARY & SR.SECONDARY SCHOOL)
PRACTICAL LIST (STD: XI)
STD: XI [Science]
PRACTICAL INDEX [TERM -2]

Sr. Practical Name Date Signature


No.
1. Program to read a string and display it in reverse order
display one character per line. Do not create a reverse
string, just display in reverse order.
2. Write a program to input an integer and check if it
contains any 0 in it.
3. Write a program that asks a user for a username and a
pcode. Make sure that pcode does not contain username
and matches ‘Trident111’
4. Program that reads a line and prints its statistics like:
Number of uppercase letters :
Number of alphabets :
Number of symbols :
Number of lowercase letters :
Number of digits :
5. Write a program that inputs individual words of your
school motto and joins them to make a string. It should
also input day, month and year of your school’s
foundation date and print the complete date.
6. Extract two list slices out of a given list of members.
Display and print the sum of elements of first list-slice
which contains every other element of the list between
indexes 5 to 15.Program should also display the average
of elements in second list slice that contains every fourth
element of the list. The given list contains numbers from
1 to 20.
7. Write a program to create a copy of a list. In the list’s
copy, add 10 to its first and last elements. Then
display the lists.
8. Program to create a 2D list.
9. Write a program that displays options for inserting or
deleting elements in a list. If the user chooses a deletion
option, display a submenu and ask if element is to be
deleted with value position or a list slice is to be deleted.
10. Write a program that inputs a list, replicates it twice
and then prints the sorted list in ascending and
descending orders.
11. Write a program to input a tuple and check if it contains
the all elements as same.
12. Write a python program that creates a tuple storing
first 9 terms of Fibonacci series.
13. Write a program to create a nested tuple to store roll
number, name and marks of students.
1. Program to read a string and display it in reverse order display one character
per line. Do not create a reverse string, just display in reverse order.

Output:

2. Write a program to input an integer and check if it contains any 0 in it.

3. Write a program that asks a user for a username and a pcode. Make sure that
pcode does not contain username and matches ‘Trident111’
4. Program that reads a line and prints its statistics like:
Number of uppercase letters:
Number of alphabets:
Number of symbols:
Number of lowercase letters:
Number of digits:

5. Write a program that inputs individual words of your school motto and joins
them to make a string. It should also input day, month and year of your school’s
foundation date and print the complete date.
Output:

6. Extract two list slices out of a given list of members. Display and print the sum
of elements of first list-slice which contains every other element of the list
between indexes 5 to 15.Program should also display the average of elements in
second list slice that contains every fourth element of the list. The given list
contains numbers from 1 to 20.

7. Write a program to create a copy of a list. In the list’s copy, add 10 to its
first and last elements. Then display the lists.
L1 = [17, 24, 15, 30, 34, 27]
L2 = L1.copy()
print(“Original List: ”, L1)
print(“Created copy of the list:” , L2)
L2[0] +=10
L2[-1] +=10
print(“Copy of the list after changes:” , L2)
print(“Original list:” L1)
Output
Original list : [17, 24, 15, 30, 34, 27]
Created copy of the list : [17, 24, 15, 30, 34, 27]
Copy of the list after changes : [27, 24, 15, 30, 34, 37]
Original list : [17, 24, 15, 30, 34]

8. Program to create a 2D list.

9. Write a program that displays options for inserting or deleting elements in a


list. If the user chooses a deletion option, display a submenu and ask if element is
to be deleted with value position or a list slice is to be deleted.
10. Write a program to input a tuple and check if it contains the all elements as
same.

11. Write a program to input a tuple and check if it contains the all elements
as same.

12. Write a python program that creates a tuple storing first 9 terms of
Fibonacci series.
lst = [0,1]
a=0
b=1
c=0
for i in range(7):
c=a+b
a=b
b=c
lst.append(c)
tup = tuple(lst)
print("9 terms of Fibonacci series are:", tup)

Output

9 terms of Fibonacci series are: (0, 1, 1, 2, 3, 5, 8, 13, 21)


13. Write a program to create a nested tuple to store roll number, name and marks of
tup = () ans = "y"
while ans == "y" or ans == "Y" :
roll_num = int(input("Enter roll number of student: ")) name = input("Enter name of student: ")
marks = int(input("Enter marks of student: ")) tup += ((roll_num, name, marks),)
ans = input("Do you want to enter more marks? (y/n): ") print(tup)

Output

Enter roll number of student: 1


Enter name of student: Shreya Bansal
Enter marks of student: 85
Do you want to enter more marks? (y/n): y
Enter roll number of student: 2
Enter name of student: Nikhil Gupta
Enter marks of student: 78
Do you want to enter more marks? (y/n): y
Enter roll number of student: 3
Enter name of student: Avni Dixit
Enter marks of student: 96
Do you want to enter more marks? (y/n): n
((1, 'Shreya Bansal', 85), (2, 'Nikhil Gupta', 78), (3, 'Avni Dixit', 96))

You might also like