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

Xi - Ip (Slip Test)

Uploaded by

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

Xi - Ip (Slip Test)

Uploaded by

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

SECTION -A

1 To find the second element of list namely ‘smiles’ in Python, _____ will be used. 1
a) smiles[0] b) smiles[1]
c) smiles[-2] d) smiles[:]
2 What is the output of the following 1
l = [None] * 3
print(l))
a) [None, None, None] b) 0 c) Syntax Error d) None
3 What would the following code print? 1
d = {'spring': 'autum', ‘autumn’:’ fal’, ‘fall’:’spring’}
print (d[fall])
a) autumn b) fall c) spring d) Error
4 To create a table we will use 1
a) Create command b) Insert command c)Select command d) None of all
5 What is printed by the following statements ? 1
D1 = {"cat":17, "dog":6, "elephant":23, "bear":20}
print (23 in D1)
a)True b)False c)Error d) None
6 Which of the following will return the length element of a list L? 1
a) len(L) b) len.L[] c) L.len() d) len()
7 Given a list L = [10, 20, 30, 40, 50, 60, 70], what would L[ :4] return? 1
a) [10, 20, 30, 40] b) [20, 30, 40, 50]
c) [20, 30, 40] d) [30, 40, 50]
8 Given a list L = [10, 20, 30, 40, 50, 60, 70], what would L[2: ] return? 1
a) [10, 20, 30, 40] b) [20, 30, 40, 50]
c) [20, 30, 40] d) [30, 40, 50]
9 Which command is used to describe our table? 1
a) Show b) Use c) Describe d) Create
10 Which of the following functions will return the key, value pairs of a dictionary? 1
(a) keys() b) values() c) items() d) all of these
SECTION B
11 WAP to write a length of the given list l = [1,2,3,4,5,6] 2
OR
Write a Output of the following program:
A= [45,56,67,78,89,90,100,12,130,156,167,178]
print(A[:6])
print(A[4:7])
12 Rewrite the following program code using a for loop: 2
i=1
sum = 0
while ( i < 10 ):
sum += i; i += 2
13 How to concat 2
14 2

Page 1 of 3
15 2

24 Create the table student as per following table given: 2


Column Roll_no Student_name
Nam
Data type Number Varchar
Length 4 25
25 2
SECTION C
26 Find and write the output. 3
A = [1,3,5,7,8,9]
print(A[2:])
print(A[1:2])
print(A[:6])
OR
Find the output of the following:
d= {1:”Python”, 2: “JAVA”, 3: “ DBMS”, 4:” MYSQL”}
for i in d:
print(i+i, ‘:’ , d[i])
print(“Dictionary “)
27 Write the full form of the following 3
i. DML ii. DDL iii. TCL iv. DBMS v. SQL vi. OSS
28 Differentiate the following SQL : 3
i) Alter and Update ii) Delete and Drop
29 Write a program in Python to input a number and print whether it is odd or even? 3
OR
PNR
Write a Program in Python to calculate Simple Interest? ( )
100
30 WAP to print the area of circle when radius of the circle is given by user. 3
(πr2 where π=3.14)
SECTION D
31 i) Suppose there is a table named student with 6 rows and 4 columns. 2 more rows 4
added and one column deleted from the table. What will be degree/record and
cardinality/field of table student?
ii) what is difference between tuple and attribute
32 Predict the output: 4
List1=[13, 18, 11, 16, 13, 18, 13]
print(List1.index(18))
print(List1.count(18))
List1.append(List1.count(13))
print(List1)

SECTION E
33 i)WAP for List manipulation. (Any five) 5
OR
ii) Write a python code to print factorial of first 5 numbers.
34 Write the system for the following SQL command: 5
Page 2 of 3
i) Create table ii) insert values iii) rename column name
iv) modify the data type v) add primary key
35 Write SQL commands for the following table MOVIE: 5
NO TITLE TYPE RATING SEATS_LEFT PRICE
1 ARMY PATRIOTIC A 4 250
2 AIR FORCE ACTION B 2 175
3 RACE ACTION C 7 245
4 TIRANGA PATRIOTIC A 3 130
i) Display the list of movies with price over 200 rupees and sorted by rating.
ii) Display a report listing the movie number, price from the table movie.
iii) Display the number of seats left for action movies.
iv) Delete all the movies from the table with rating ‘C’.
v) Display all the tuple form table movie.
Or
Explain the use of the following Dictionary Methods with example.
i) clear() ii) items() iii) Dict() iv) get() v) Values()

Page 3 of 3

You might also like