Advertisements
Advertisements
Consider the table CLUB given below and write the output of the SQL queries that follow.
| CID | CNAME | AGE | GENDER | SPORTS | PAY | DOAPP |
| 5246 | AMRITA | 35 | FEMALE | CHESS | 900 | 2006- 03-27 |
| 4687 | SHYAM | 37 | MALE | CRICKET | 1300 | 2004- 04-15 |
| 1245 | MEENA | 23 | FEMALE | VOLLEYBALL | 1000 | 2007- 06-18 |
| 1622 | AMRIT | 28 | MALE | KARATE | 1000 | 2007- 09-05 |
| 1256 | AMINA | 36 | FEMALE | CHESS | 1100 | 2003- 08-15 |
| 1720 | MANJU | 33 | FEMALE | KARATE | 1250 | 2004- 04-10 |
| 2321 | VIRAT | 35 | MALE | CRICKET | 1050 | 2005- 04-30 |
- SELECT COUNT(DISTINCT SPORTS) FROM CLUB;
- SELECT CNAME, SPORTS FROM CLUB
WHERE DOAPP<"2006-04-30" AND CNAME LIKE "%NA"; - SELECT CNAME, AGE, PAY FROM CLUB WHERE GENDER = "MALE" AND PAY BETWEEN 1000 AND 1200;
Concept: undefined >> undefined
Write a function in Python to read a text file, Alpha.txt and displays those lines which begin with the word ‘You’.
Concept: undefined >> undefined
Advertisements
Write a function, vowelCount() in Python that counts and displays the number of vowels in the text file named Poem.txt.
Concept: undefined >> undefined
Consider the tables PRODUCT and BRAND given below:
| Table: PRODUCT | ||||
| PCode | PName | UPrice | Rating | BID |
| P01 | Shampoo | 120 | 6 | M03 |
| P02 | Toothpaste | 54 | 8 | M02 |
| P03 | Soap | 25 | 7 | M03 |
| P04 | Toothpaste | 65 | 4 | M04 |
| P05 | Soap | 38 | 5 | M05 |
| P06 | Shampoo | 245 | 6 | M05 |
| Table: BRAND | |
| BID | BName |
| M02 | Dant Kanti |
| M03 | Medimix |
| M04 | Pepsodent |
| M05 | Dove |
Write SQL queries for the following:
- Display product name and brand name from the tables PRODUCT and BRAND.
- Display the structure of the table PRODUCT.
- Display the average rating of Medimix and Dove brands.
- Display the name, price, and rating of products in descending order of rating.
Concept: undefined >> undefined
How is http different from https?
Concept: undefined >> undefined
Give one difference between alternate key and candidate key.
Concept: undefined >> undefined
Define the following:
Exception Handling
Concept: undefined >> undefined
Define the following:
Throwing an exception
Concept: undefined >> undefined
Define the following:
Catching an exception
Concept: undefined >> undefined
Explain catching exceptions using try and except block.
Concept: undefined >> undefined
You have learnt how to use math module in Class XI. Write a code where you use the wrong number of arguments for a method (say sqrt() or pow()). Use the exception handling process to catch the ValueError exception.
Concept: undefined >> undefined
Write the use and syntax for the following method:
seek()
Concept: undefined >> undefined
The correct syntax of seek() is ______
Concept: undefined >> undefined
Predict the output of the Python code given below:
def Diff(N1,N2):
if N1>N2:
return N1-N2
else:
return N2-N1
NUM= [10,23,14,54,32]
for CNT in range (4,0,-1):
A=NUM[CNT]
B=NUM[CNT-1]
print(Diff(A,B),'#', end=' ')Concept: undefined >> undefined
MakeInIndia Corporation, a Uttarakhand-based IT training company, is planning to set up training centres in various cities in the next 2 years. Their first campus is coming up in the Kashipur district. At the Kashipur campus, they are planning to have 3 different blocks for App development, Web designing, and Movie editing. Each block has a number of computers, which are required to be connected to a network for communication, data, and resource sharing. As a network consultant of this company, you have to suggest the best network-related solutions for the issues/problems raised in questions keeping in mind the distances between various blocks/locations and other given parameters.

Distance between various blocks/locations:
| Block | Distance |
| App development to Web Designing | 28 m |
| App development to Movie Editing | 55 m |
| Web designing to Movie Editing | 32 m |
| Kashipur Campus to Mussoorie Campus | 232 km |
Number of computers
| Block | Number of Computers |
| App development | 75 |
| Web Designing | 50 |
| Movie editing | 80 |
- Suggest the most appropriate block/location to house the SERVER in the Kashipur campus (out of the 3 blocks) to get the best and most effective connectivity. Justify your answer.
- Suggest a device/software be installed in the Kashipur Campus to take care of data security.
- Suggest the best-wired medium and draw the cable layout (Block to Block) to economically connect various blocks within the Kashipur Campus.
- Suggest the placement of the following devices with appropriate reasons:
a. Switch/Hub
b. Repeater - Suggest a protocol that shall be needed to provide a Video Conferencing solution between Kashipur Campus and Mussoorie Campus.
Concept: undefined >> undefined
The syntax of seek() is:
file_object.seek(offset[,reference_point])
What is the default value of reference_point?
Concept: undefined >> undefined
Name any two DML commands.
Concept: undefined >> undefined
“In a Python program, if a break statement is given in a nested loop, it terminates the execution of all loops in one go.”
Concept: undefined >> undefined
Which of the following functions changes the position of file pointer and returns its new position?
Concept: undefined >> undefined
What is the use of finally clause? Use finally clause in the problem given below.
print (" Learning Exceptions…")
try:
num1 = int(input ("Enter the first number"))
num2 = int(input("Enter the second number"))
quotient=(num1/num2)
print ("Both the numbers entered were correct")
except ________: # to enter only integers
print (" Please enter only numbers")
except __________: # Denominator should not be zero
print(" Number 2 should not be zero")
else:
print(" Great .. you are a good programmer")
___________________ : # to be executed at the end
print(" JOB OVER… GO GET SOME REST")Concept: undefined >> undefined
