0% found this document useful (0 votes)
170 views17 pages

D.A.V Public School, Sector-37 Faridabad: Computer Science (083) Practical File

This document contains the practical file of Computer Science students Aman Singh Negi, Dhruv Sharma, and Hritwiz Kamat of class 12A. It lists 15 programming problems solved by the students along with the code and output for each problem. The problems cover topics like palindrome checking, string manipulation, tuples, dictionaries, file handling and more.

Uploaded by

Aman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
170 views17 pages

D.A.V Public School, Sector-37 Faridabad: Computer Science (083) Practical File

This document contains the practical file of Computer Science students Aman Singh Negi, Dhruv Sharma, and Hritwiz Kamat of class 12A. It lists 15 programming problems solved by the students along with the code and output for each problem. The problems cover topics like palindrome checking, string manipulation, tuples, dictionaries, file handling and more.

Uploaded by

Aman
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 17

D.A.

V PUBLIC SCHOOL, SECTOR-37 FARIDABAD


AISSCE
Session 2021-22
Term: I

COMPUTER SCIENCE (083)

PRACTICAL FILE

MADE BY-
NAME :Aman Singh Negi, Dhruv Sharma & Hritwiz Kamat
CLASS : XII A
BOARD ROLL NO :________
Practical List:
S.no. Programs
Write a program using a user defined function to check if a string is a palindrome or not.
1
change an inputted string into a list and then count no of a letter inputted by the user and find length of the
2 list.

To store records of students in tuple and print them


3
Make a dictionary.Print keys and values of dictionary.Now update the dictionary by taking keys and
4 values to be updated by the user and now print the new updated dictionary.

Input a string from the user.Now do its slicing by taking the lower and upper limits from the user.Also
5 reverse the string by the method of slicing.

Write a program which gives the value of compound interest by taking the inputs required and then tell
6 the total amount to be paid.

Write a program that reads a date as an integer in the format MMDDYYYY. The program will call a
7 function that prints out the date in the format <Month Name> <day>, <year>.

Write a program that returns the area and perimeter of a circle rectangle and square after taking input
8 from the user.

Write a Python program to reverse a string by taking input from the user.
9
Write a Python function that accepts a string and calculate the number of uppercase letters and
10 lowercase letters

Write a program to create a text file in which quotes can be written and find the no. of times character
11 'a' or 'A' occurs in the text.

Write a program that creates a binary file with roll number, name and marks and add a new roll number,
12 name and marks of a student.

Write a program to search for a given roll number in "Record.dat" file and display the name, if not found
13 display appropriate message.

Write a program to create a CSV file by entering user-id and password.


14
Write a program to read and search the password for a given user-id.
15
#PROGRAM 1:Write a program using a user defined function
to check if a string is a palindrome or not.
Code:

Output:
#PROGRAM 2: change an inputted string into a list and then
count the number of letters inputted by the user and find length
of the list.
CODE:

OUTPUT:

#PROGRAM 3: To store records of students in tuple and print


them.
CODE:

OUTPUT:

#PROGRAM 4: Make a dictionary.Print keys and values of


dictionary.Now update the dictionary by taking keys and values
to be updated by the user and now print the new updated
dictionary.

CODE:

OUTPUT:

#PROGRAM 5:Input a string from the user.Now do its slicing


by taking the lower and upper limits from the user.Also reverse
the string by the method of slicing.
CODE:

OUTPUT:

#PROGRAM 6: Write a program which gives the value of


compound interest by taking the inputs required and then tell
the total amount to be paid.
Code:
Output:

#PROGRAM 7: Write a program that reads a date as an integer


in the format MMDDYYYY. The program will call a function
that prints out the date in the format <Month Name> <day> ,
<year>.
Code:
Output:

#PROGRAM 8: Write a program that returns the area and


perimeter of a circle rectangle and square after taking input
from the user.
Code:
Output:

#PROGRAM 9: Write a Python program to reverse a string by


taking input from the user.
Code:
Output:

#PROGRAM 10: Write a Python function that accepts a string


and calculates the number of uppercase letters and lowercase
letters.
Code:
Output:

#PROGRAM 11:Write a program to create a text file in which


quotes can be written and find the no. of times character 'a' or
'A' occurs in the text.
Code:
Output:

Text file created:

#Program 12: Write a program that creates a binary file with


roll number, name and marks and add a new roll number, name
and marks of a student.
Code:
Output:

Bin
ary file created:

#Program 13: Write a program to search for a given roll


number in "Record.dat" file and display the name, if not found
display appropriate message.

Code:
Output:

#Program 14: Write a program to create a CSV file by entering


user-id and password.
Code:
Output:

CSV file created:

#Program 15: Write a program to read and search the password


for a given user-id in “Info.csv” file.
Code:
Output:

You might also like