0% found this document useful (0 votes)
78 views4 pages

Class Xii (2024 25)

Question Paper
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)
78 views4 pages

Class Xii (2024 25)

Question Paper
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/ 4

GURU NANAK PUBLIC SCHOOL, SEC-21, ROURKELA

PRACTICAL QUESTIONS FOR THE SESSION 2024-25


CLASS-XII (SCIENCE/COMMERCE) SUB: PYTHON (083)
1. WAP in python to define a user define function Arithmetic(a, b) to find all arithmetic
calculation.
2. WAP in python to define two user define function Circle(rad), Rectangle(len, brd) to find
area and perimeter.
3. WAP in python to define user define function Armstrong(no) to check the no is Armstrong or
not.
4. WAP in python to implement the concept of Default Argument.
5. WAP in python to implement the concept of Keyword Argument.
6. WAP in python to implement “Void function with no argument”.
7. WAP in python to implement “Void function with argument”.
8. WAP in python to implement “Non void function with no argument”.
10.WAP in python to implement “Non void function with argument”.
11. WAP in python to define a user define function Palindrome(Str), to check the string is
palindrome or not.
12. WAP in python to define a user define function Check(Str), to find total no of vowels, digits,
consonants are there.
13. WAP in python to define a function BinarySearch(Lst), to search the element in list using
Binary Search technique. If the no is not present then appropriate message should return.
14. WAP in python to define a function Display(Tup), to accept some words in lowercase in a
tuple. Pass the tuple to a function and display only those words which starts with a vowel.
15. WAP ion python to define a function that repeatedly asks the user to enter his/her name and
phone no in the dictionary, where name is key and phone no. is value. Ask user to enter name
and display it name with phone no. and if the name is not available then appropriate message
should display.
16. WAP in python to create a module Area, Where the following function should define.
(a). def Circle(rad): returns area of circle.
(b). def Rectangle(len,brd): returns area of rectangle.(c).
def Square(a): return area of square.
17. WAP in python to import entire mode Area to a current program and use all its object.
18. WAP in python to import specific object from module Area and use that object in the current
program.
19. WAP in python to import math module in current program and perform required
mathematicalfunction.WAP in python to develop a Casino game using random module, where
you ask user to enter some amount and lucky number. If the lucky number is matched with no
generated by randomfunction, then he/she will get 3 times of the amount other wise a
message “Better luck next time” is displayed.

20. WAP in python to generate 10 six digit OTP using random module.
E.g. OTP-210703
21. WAP in python to generate 10 OTP using random module as per the following.
E.g. OTP-W8T9F2
22. WAP in python to define a function Paragarph() to create a text file “Notebook.txt” to write
few lines into it. If you don’t want to write more lines then enter 0(zero) to quit the function.
23. WAP in python to define a function Display() to read a text file “Python.txt” and display how
many vowels in it.
24. WAP in python to define a function Display() to read a text file “Python.txt” and display how
many words starting with letter ‘O’ in it.
25. WAP in python to define a function Display to read a text file “Python.txt” and display how
many words ends with digit.
26. WAP in python to define a function Lines() to read the text file Notebook.txt and display all
lines available in the file with line number.
27. WAP in python to create a text file ‘Admission.txt’ where the names of all the students who
have taken admission in XI are stored along with Admission no and Steram. Write a function
Add_Name() in python to update the text file Admission.txt to add new names in the existing
file. Open the file in append mode and add the names till you want. If you don’t want to add
more names the enter 0(zero) to quit the function.
28. WAP in python to define a function Shift_Name() in python to copy the names of the students
of ‘Science’ stream in another text file ‘Science.txt’ from ‘Admission.txt’ file. finally, display
all the records of the file ‘Science.txt’.
29. WAP in python to define a function Line() to read a text file “Python.txt” and display the line
which have more than 8 words.
30. WAP in python to
(a). Define a function Sports() to create a Binary file ‘Prize.dat’ store the records comprising
Name, Class, and Rank of all the ‘Prize Winners’ of class X, XI, and XII students.
(b).WAP in python to define a function PrizeWinner() to read a Binary file ‘Prize.dat’ and
display all the names along with the class and Rank, who have secured ‘Rank’ as 1(One) in
the format shown below:
Name Class Rank
Arjun Sing XII-A 1
…………. ……… …….
31. WAP in python to
(a). Define a function ‘NAMELIST():’ to create a binary file “Name.dat” where you ask user
to insert some name in list and Store the list in “Name.dat” file.
(b). Define a function ‘Count():’ to count and display the number of lowercase and uppercase
letters in each name, available in the file.
32. WAP in python to
(a). Define a function Phone(): to create a binary file “Contact.dat” to insert Name and Phone
No. of few persons in any object(list, tuple, dictionary) and it in binary file.
(b). Define a function Search(): to search a name in the file ”Contact.dat”. If the name is found
the display “The record is found”, otherwise display ‘No such name is available’ in the
file.
33. WAP in python to
(a). Define a function “Result():” to create a binary file “Results.dat” to store names and marks
in English, Math and Computer of all the students of class XII.
(b). Define a function “Result_Disp():” to display the names of all the students who have
secured 90% and above in English, Math, and Computer Science.
34. WAP in python to
(a). Define a function CreateTrip(): to create a csv file “Holidays.csv” to keep the records of
holidays package trips for different places with their tariffs. The format is as shown below:
Type Trip Days TourCost
A01 Delhi-Agra 2 5000
A02 Delhi-Goa 3 8000
…… …………. …… …………..
(b). Define a function ShowTrip(): to read all the records of the file “Holiday.csv” and display
the details of holidays package trips for different places with their tariff.
35. WAP in python to
(a). Define a function CreateMedals(): to create a csv file “Sports.csv” to keep the records of
number of medals won by each school in the Inter school Sports Meet. The format is as
shown below:
SchoolName Gold Silver Bronze
Valley Green 1 2 4
Hill View 3 5 7
Blue Bells 2 8 6
…………..… …. …. ….
(b). Define a function ShowMedals(): to read all the records of the file “Sports.csv” and
display the total number of medals won by particular school.
The User enters the name of a school to display the total number of medals won, if the name
doesn’t exist the it display an appropriate message.
36. WAP in python to
(a). Define a function CreateSalary(): to create a csv file “Employee.csv” to keep the records
of salary of employees under different fields as mention below:
EmpCode EmpName Grade Salary
E01/01 Anand Mishra SP4 45000
E01/02 Ramesh Shukla SP3 41000
……… ………………... …. ….….
(b). Define a function ShowSalary(): to read all the records of the file “Employee.csv” and
display the records of all those employees whose salary is 40,000 or above.
37. WAP in python to implement a stack to store the temperatures in degree Celsius such that the
temperatures that is entered into stack last can be accessed first. Perform the following
operations with the details, given below:
(i) Push(MyStack,tmp): To push the temperatures (tmp) into the stack (MyStack).
(ii) Peek(MyStack): Displays the topmost temperatures of Stack.
(iii) Display(MyStack): Displays the stack elements
Now,
perform the function Push() and Display() using user’s choice.
38. WAP in python to implement a stack to manage different city names with the details given
below:
(i). MyStack[]: A Stack as a list to hold the city name.
(ii). MakePush(MyStack): To push a city name at the top of the stack. Display the following:
(i). Index of the topmost city
(ii). Topmost city name
(iii). All the city name of the stack
(iii). MakePop(MyStack): To remove a city name from the top of the stack. If the stack is
empty, display the message “Underflow” else display the popped out
item.
Now, Perform the functions MakePush() and MakePop() as per the user’s choice. Under
what principle does the entity work.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy