0% found this document useful (0 votes)
20 views3 pages

Python

The document outlines practical examination tasks for Computer Science (083) at Sainik School Ambikapur for the academic year 2024-25. It includes various programming assignments in Python, such as file handling, stack implementation, sorting algorithms, and SQL database creation. Each task is designed to assess students' understanding and application of programming concepts and data structures.

Uploaded by

labphysics14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Python

The document outlines practical examination tasks for Computer Science (083) at Sainik School Ambikapur for the academic year 2024-25. It includes various programming assignments in Python, such as file handling, stack implementation, sorting algorithms, and SQL database creation. Each task is designed to assess students' understanding and application of programming concepts and data structures.

Uploaded by

labphysics14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

SAINIK SCHOOL AMBIKAPUR

COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1. Write a program to read content of a file “MEMO.TXT” and print number of


occurrence of the word “do” in it. Do not count the within a word eg. “done”.
Ex :- I will do it, if you request me to do it. It would have been done much earlier

2. Write a Menu driven program to implement stack:


 Push
 Pop
 Peek
 Display
 Exit

SAINIK SCHOOL AMBIKAPUR


COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1. Write a function in Python that counts the number of “Me” or “My” words present
in a text file “STORY.TXT”
2. Write a program using function SUMFUN( ) with arguments X and N which
returns the sum of N terms of the following: x-x3 /3 + x5 /5 – x7 /7 + x9 /9…..

SAINIK SCHOOL AMBIKAPUR


COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1. Write a python program using function PUSH(Arr), where Arr is a list of numbers.
From this list push all numbers divisible by 5 into a stack implemented by using a
list. Display the stack if it has at least one element, otherwise display appropriate
error message.
2. Program to write data in a csv file student.csv. and then read and display the data
from student.csv file.

SAINIK SCHOOL AMBIKAPUR


COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1. Write a program to accept an array of marks of ten students and sort using
Bubble/Selection sort.
2. Write a python program using function POP(Arr), where Arr is a stack
implemented by a list of numbers. The function returns the value deleted from the
stack.

SAINIK SCHOOL AMBIKAPUR


COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1. Write a program in python to create a stack “student” with details of student name
and their marks. Write Operation for Push, Pop and Traversal operation using menu.
2. WAP to open a file and count the Number of Lines, No. of Words and No. of
Characters in a given file.
SAINIK SCHOOL AMBIKAPUR
COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1. Write a Program to create a binary file to store roll number and name and search any
roll number and display the respective name.
2. Write a python program to create a stack of Book’s record which contains [Book
code, Book title, Book price].
 Write function PUSH to add record into the stack
 Write function POP and display the record in the stack

SAINIK SCHOOL AMBIKAPUR


COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1.Write a function in Python that counts the number of “this” or “that” words present
in a text file “STORY.TXT”
2. Write a python program to create stack Sport_Stack to store age of sportsman using
stack implementation as list. Write Operation for Push, Pop and Traversal operation
using menu.

SAINIK SCHOOL AMBIKAPUR


COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1. Write a function in Python that counts the number of “Me” or “My” words present
in a text file “WORD.TXT”
2. Write a python program to create a stack of Book’s record which contains [Book
code, Book title, Book price].
 Write function PUSH to add record into the stack
 Write function POP and display the record in the stack

SAINIK SCHOOL AMBIKAPUR


COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1.Write a function in Python that counts the number of “this” or “that” words present
in a text file “STORY.TXT”
2. Write a Menu driven program to implement stack:
 Push
 Pop
 Peek
 Display
 Exit
SAINIK SCHOOL AMBIKAPUR
COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1.Write a function in Python that counts the number of “this” or “that” words present
in a text file “STORY.TXT”
2. Write a python code to create a SQL table Cadet (using pymysql interface ) with
following specifications:
 Schno – int – size 4 – Primary Key
 Name – char – size 15
 DOB – Date
Note the following to establish connectivity between Python and MYSQL:
 Username is root
 Password is ssap
Insert one row as given below:
SchNo Name DOB
851 Shivam Kumar 21-06-2007

SAINIK SCHOOL AMBIKAPUR


COMPUTER SCIENCE (083) , PRACTICAL EXAMINATION 2024-25

1. Write a function in Python that counts the number of “Me” or “My” words present
in a text file “WORD.TXT”
2. Write a python code to create a SQL table Student (using pymysql interface )
with following specifications:
 Admno – int – size 4 – Primary Key
 SName – char – size 15
 DOB – Date
Note the following to establish connectivity between Python and MYSQL:
 Username is root
 Password is tiger
Insert one row as given below:
AdmNo SName DOB
1229 Harsh Bhati 21-03-2006

You might also like