Cs Prac File Class 12
Cs Prac File Class 12
n j
∑ xj ! (−1 ) j +1
j=1
Output:
Q4) Create a palindrome function which intakes string and returns Boolean true if palindrome and
false if not
Output:
Q5) Create a function data which intakes dictionary as argument. Structure has name as key and
section and stream a part of tuple as a value. Function returns string of names of study in science
stream
Output
Q6) A list contains name of exam centres where exam can be conducted in North India
(L=[‘Delhi’,’Noida’,’Gurgaon’,’Faridabad’]). WUDF allot which accepts reg no. of user and randonmly
allots of the centre to user. While allotment is created storing no. of students allotted to each center
and value is printed as:
Delhi:3
Noida:1
N*(U.L-L.L)
Output:
Q8) Create a function compile which intakes dictionary with following structure as value {name:
[EL,CL,LL]}. The function changes the value of dictionary of adding paycut for their employees whose
total leaves are more than 20. The dictionary is returned and output is printed.
Output:
Q9) Assume a file ‘Citation.txt’ is created for you. From the file create another file ‘toggle.txt’ where
contents are toggled & display one file after the other.
Output:
Q10) WAP to create a file with following operation using UDF- 1)Add 2)Search by rating
3)Modify(name) 4)Remove(name) 5)Display all 6)Exit