You are on page 1of 1

Python Programming, INT-213 CA-II(K17EB)

SET – I
MM: 30 CLASS: ______ DATE: _______ TIME: 1 hr
Q1. Write the output of the following:[10]
1. week = [‘sun’,’mon’,’tue’,’wed’,’feb’,’thu’,’fri’,’sat’]
week[4:5]=[]
week
2. s = “deepak is very caring and loving”
str.capitalize(s)
3. num = [1,2,3,4,5]
num.pop()
num
num.pop(1)
num
4. p = [2**x for x in range(10) if x%2==0]
print(p)

Q2. Write a program to use special methods(__lt__,__gt__,__le__) and compare two objects.
Q3. Write a program that has a class Circle. Use a class variable to define the values of constant Pi. Use
this class variable to calculate area and circumference of a circle with specified variables.[10]

Python Programming, INT-213 CA-II(K17EB)


SET – II
MM: 30 CLASS: ______ DATE: _______ TIME: 1 hr
Q1. Write the output of the following:[10]
1. hobbies= [‘painting’,’creative’,’writing’,’reading’]
hobbies[:]=[]
hobbies
2. s = “Ishan Ayushi Abhi Karan”
str.lower(s)
3. num = [10,20]
n = 30
num.append(n)
m=40
num.append(m)
print(num)
4. p = [2**x for x in range(10) if x%3==0]
print(p)

Q2. Write a function histogram that take string as parameter and generate a frequency of character in
it.[10]
Q3. Write a program to override Display() method in multiple inheritance.[10]

You might also like