You are on page 1of 1

KENDRIYA VIDYALAYA BALLYGUNGE

SUMMER VACATION HOLIDAY HOMEWORK


CLASS – XII SUB- COMPUTER SCIENCE (083) (2022-23)

Q1. Write a program that creates a GK quiz consisting of any five questions of your choice. The
questions should be displayed randomly. Create a user defined function score() to calculate the
score of the quiz and another user defined function remark (scorevalue) that accepts the final score
to display remarks as follows:

Q2. Write a program that contains user defined functions to calculate area, perimeter or surface area
whichever is applicable for various shapes like square, rectangle, triangle, circle and cylinder. The
user defined functions should accept the values for calculation as parameters and the calculated
value should be returned. Import the module and use the appropriate functions.

Q3. Write a program that accepts a sentence as a string and prints the largest word in the sentence
and its length. For example if the sentence is “India is a great country” then the output will be
country and its length=7. Use function to achieve this.

Q4. Write a user defined function to convert a string with more than one word into title case string
where string is passed as parameter. (Title case means that the first letter of each word is capitalised)

Q5. Write a function deleteChar() which takes two parameters one is a string and other is a
character. The function should create a new string after deleting all occurrences of the character
from the string and return the new string.
PROJECT
Using python create a library named as “maths” that contains functions for – factorial(), prime(),
squareroot(), power(), Fibonacci() and write any python program that uses “maths” library.

************

You might also like