PB QP Set B
PB QP Set B
5. A table student has 15 columns and 100 rows. 10 are rows added later.
What is the degree and cardinality of the table now?
(a) Degree : 5, Cardinality:110 (b) Degree : 15,
Cardinality:110
( c) (a) Degree : 10, Cardinality:90 (d) (a) Degree : 150,
Cardinality:90
6. ABC corporation has its offices in the city of lucknow, connected together
in a network. These offices are separated by a distance of approximately
45-50km. which kind of network is formed?
(a) PAN (b) WAN (c) MAN (d) LAN
8. Consider following list for python language L = [13, 3.45, “Tree”, ‘Amar’,
[10, 8.91,”Apple”], 456]
The output of L[-2] will be
(a) (10, 8.91, ‘Apple’) (b) [10,8.91, ‘Apple’]
(c) {10, 8.91, ‘Apple’} (d) None of these
9. Which output lines of the following program will print the same result?
tup1 =(10, 20, 30, 40, 50, 60, 70, 80, 90)
print (tup1[ 5 : -1])
print (tup1[ 5])
print (tup1[ 5 :])
print (tup1[ -4 : 8])
(a) (1) and (2) (b) (1) and (4) (c) (2) and (3)
(d) (1), (3) and (4)
SECTION –B
19. (a) Differences between Switch and Router.
24. What is the differences between Primary key and Alternate key.
OR
Differentiate between char(n) and varchar(n) data types with respect to
databases.
25. Find the output of the following code.
def displayString():
p = None
q=0
r=””
s=None
if(p==q):
print ("None is the same as 0” )
elif(p==r):
print ("None is the same as empty string")
elif (p ==s):
print ("None is the same as the string 'None'")
else:
print ("None of the above")
displayString()
SECTION –C
26. Write the program to read the content from one file and write it another
file.
28. Write a function in Python that counts the number of “Me” or “My” words
present in a text file "STORY.TXT". If the "STORY.TXT" contents are as
follows:
My first book
was Me and
My Family. It
gave me
chance to be
Known to the
world.
The output of the function should be
Count of Me/My in file:
OR
Write a function to count the number of lines starting with a digit in a text
file "Diary.txt"
Table: School
Table: Admin
(i) To display each designation and count of each type for designations
where count is <2.
(ii) To display the maximum experience
(iii) To display names of teachers who have more than 12 years of
experience in ascending order of teacher name.
(iv) To display teacher names and corresponding designations from
both the tables.
32. What is binary file? Write down the modes and operations in binary
files.
SECTION-E
33. Perfect Edu Services Ltd. Is an educational organization. It is planning to
setup its India campus at Karnataka with its head office at Delhi. The
Karnataka Campus has 4 main buildings-ADMIN, ENGINEERING, BUSINESS
and MEDIA.
You as a network expert have to suggest the best network related solutions
for their problems raised in (1) to ( keeping in mind the distances between
the buildings and other given parameters.
iii) Which hardware device will you suggest to be procured by the company
to be installed to protect and control the internet uses within the campus?
iv) Which of the following will you suggest to establish the online face to face
communication between the people in the admin office of Karnataka campus
and Delhi Head office
v) The organization is planning to link its sale counter situated in various part
of the same city. Which type of network out of LAN, WAN, MAN will be
formed?
34. (i) Write any two needs for a data file.
(ii) How will you open a text file text.txt in write and read mode?
35. (i) Which keyword is used to sort the records of a table in descending
order?
(ii) Consider the tables FACULTY and COURSES with structure as follows.
COURSES FACULTY
C_ID F_ID
F _ID FName
Cname LName
Fees HiredDate
Salary
Write SQL Queries for above tables.
1. Create table Faculty and Courses.
2. Insert the values into the tables.
3. Alter the table column Fname into FirstName
4. delete the records from the courses table.