Question
Indian Law Organization is planning to computerized their application form. For registration, organization has setup the rules imposed by Indian Law. Citizen can check their eligibility criteria by providing Nationality, Gender and Age.

On the basis of above code, choose the best appropriate option.

(a) Which statement will be executed if Nationality is Indian, Gender is Male and Age is 19.

(i) Statement 1 (ii) Statement 2

(iii) Statement 3 (iv) Statement 4

(b) Which Statement will be executed, if Nationality is American, Gender is Female and Age is 27.

(i) Statement 1 (ii) Statement 2

(iii) Statement 4 (iv) Statement 5

(c) Which Statement is executed, if Nationality is Indian, Age is 25 and Gender if Female.

(i) Statement 1 (ii) Statement 2

(iii) Statement 3 (iv) Statement 4

(d) Which Statement is executed, if Nationality is Indian, Age is 17 and Gender is Female.

(i) Statement 1 (ii) Statement 2

(iii) Statement 3 (iv) Statement 4

(e) Which statement will be executed if Nationality is Indian, Gender is Male and Age is 29.

(i) Statement 1 (ii) Statement 2

(iii) Statement 3 (iv) Statement 4

Answer

(a) (ii) Statement 2 (b) (iv) Statement 5 (c) (iii) Statement 3 (d) (iv) Statement 4 (e) (i) Statement 1

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

(a) Create the Dictionary Student with the following key and add the 5 values. Dictionary will be created from 4 different list:

Column Name Key
Student Number sno
Student Name sname
E-mail mail
Marks mark

(b) Create the data frame for the above specification containing index parameter along with column.

(c) Add a new column grade into above Data Frame with at least 3 methods.

(d) Insert the 2 rows.

(e) Create another Data Frame with two rows named DF2.

(f) Add this data frame to your existing data frame.

(g) Display the alternate rows.

(h) Display the name and marks of the students whose marks is greater than equal to 90.

(i) Fill all NaN in the data.

(j) Increase the marks by 10.

Dhruv Kumar of class 12 is writing a program to create a CSV file “Teacher.csv” which will store the teacher information entered by user. He has written the following code. As a programmer, help him to successfully execute the given task. Write appropriate statement / function/ code against fill ups.

Perfect Edu Services Ltd. is an educational organization. It is planning to setup its India campus at Chennai with its head office at Delhi. The Chennai campus has 4 main buildings – ADMIN,ENGINEERING, BUSINESS and MEDIA

Shortest distances between various buildings:

ADMIN to ENGINEERING55 m
ADMIN to BUSINESS90 m
ADMIN to MEDIA50 m
ENGINEERING to BUSINESS55 m
ENGINEERING to MEDIA50 m
BUSINESS to MEDIA45 m
DELHI Head Office to CHENNAICampus2175 km

Number of Computers installed at various buildings are as follows:

ADMIN110
ENGINEERING75
BUSINESS40
MEDIA12
DELHI Head Office20

(a) Suggest the most appropriate location of the server inside the CHENNAI campus (out of the 4 buildings), to get the best connectivity for maximum no. of computers. Justify your answer.

(b) Suggest and draw the cable layout to efficiently connect various buildings within the CHENNAI campus for connecting the computers.

(c) 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?

(d) Which of the following will you suggest to establish the online face-to-face communication between the people in the Admin Office of CHENNAI campus and DELHI Head Office?

(i) Cable TV

(ii) Email

(iii) Video Conferencing

(iv) Text Chat

Given the following relation: STUDENT

Table: STUDENT

No. Name Age Department Dateofadm Fee Sex
1 Pankaj 24 Computer 10/01/97 120 M
2 Shalini 21 History 24/03/98 200 F
3 Sanjay 22 Hindi 12/12/96 300 M
4 Sudha 25 History 01/07/99 400 F
5 Rakesh 22 Hindi 05/09/97 250 M
6 Shakeel 30 History 27/06/98 300 M
7 Surya 34 Computer 25/02/97 210 M
8 Shikha 23 Hindi 31/07/97 200 F

Write SQL commands for the following queries

(a) To show all information about the students of History department.

(b) To list the names of female students who are in Hindi department.

(c) To list the names of all students with their date of admission in ascending order.

(d) To display student’s name, fee, age for male students only.

(e) To count the number of students with Age>23.

Krishna of class 12 is writing a program to read the details of Sports performance and store in the csv file “games.csv” delimited with a tab character. As a programmer, help him to achieve the task.

(a)Line 1 : Name the module he should import.

(b)Line 2 : To create an object to enable to write in the csv file.

(c)Line 3 : To store the data in list

(d)Line 4 : To write a record.

(e)Line 5 : To close the file.

Consider the table "Grocer "and write SQL queries for the tasks that follow:

Table: Charity

Item_Id ItemName UnitPrice Quantity (kg) Date_Purchase
1 Rice 52.50 80 2010-02-01
2 Wheat 25.40 50 2010-03-09
3 Corn 50.80 100 2010-03-11
4 Semolina 28.90 50 2010-01-15

(Unit Price is per kg. price)

(i) Display Item name, unit price along with Date of purchase for all the Items.

(ii) Display Item name along with Month (in number) when it was purchased for all the items.

(iii) Display Item name along with year in which it was purchased for all the items.

(iv) Display Item Id, Date of Purchase and day name of week (e.g. Monday) on which it was purchased for all the items.

(v) Display names of all the items that were purchased on Mondays or Tuesdays.

(vi) Display the day name of the week on which Rice was purchased.

(vii) Display the Item name and unit price truncated to integer value (no decimal digits) of all the items.

(viii) Display current date.

Answer the following questions.

Vehicle

Challan

Offence

(a) Based on these tables write SQL statements for the following queries:

(i) Display the dates of first registration and last registration from the table Vehicle.

(ii) Display the number of challans issued on each date.

(iii) Display the total number of challans issued for each offence.

(iv) Display the total number of vehicles for which the 3rd and 4th characters of RegNo are '6C'.

(v) Display the total value of challans issued for which the Off_Desc is 'Driving without License'.

(vi) Display details of the challans issued on '2010-04-03' along with Off_Desc for each challan.

(vii) Display the RegNo of all vehicles which have been challaned more than once.

(viii) Display details of each challan alongwith vehicle details, Off_desc, and Challan_Amt.

(b) Identify the Foreign Keys (if any) of these tables. Justify your choices.

(c) Should any of these tables have some more column(s)? Think, discuss in peer groups, and discuss with your teacher.

Write the few points for the healthy use of technology.
Consider the following tables WORKER and PAYLEVEL and answer (a) and (b) parts of this question:


[Delhi 2011]

Relation: WORKER

ECODE NAME DESIG PAYLEVEL DOJ DOB
11 Radhey Shyam Supervisor P001 13-Sep-2004 23-Aug-1981
12 Chander Nath Operator P003 22-Feb-2010 12-Jul-1987
13 Fizza Operator P003 14-June-2009 14-Oct-1983
15 Ameen Ahmed Mechanic P002 21-Aug-2006 13-Mar-1984
18 Sanya Clerk P002 19-Dec-2005 09-June-1983

Relation: PAYLEVEL

PAYLEVEL PAY ALLOWANCE
P001 26000 12000
P002 22000 10000
P003 12000 6000

(a) Write SQL commands for the following statements:

(i) To display the details of all WORKERs in descending order of DOB.

(ii) To display NAME and DESIG of those WORKERs whose PLEVEL is either P001 or P002.

(iii) To display the content of all the WORKERs table, whose DOB is in between ’19-JAN-1984’ and ’18-JAN-1987’.

(iv) To add a new row with the following:

19, ‘Daya kishore’, ‘Operator’, ‘P003’, ’19-Jun-2008’, ’11-Jul-1984’

(b) Give the output of the following SQL queries:

Consider the following DataFrameDf1 and answer any four questions from (i) – (iv)

City Hospitals Schools
0 Delhi 189 7916
1 Mumbai 208 8508
2 Kolkata 149 7226
3 Chennai 157 7617

(a) Choose the right statement to get the given output:

(i) Df1.mean()

(ii) Df1.mean(axis=1)

(iii) Df1.average()

(iv) Df1.median()

(b) Write the command to get the given output:

City Hospitals Schools
3 Chennai 157 7617
0 Delhi 189 7916
2 Kolkata 149 7226
1 Mumbai 208 8508

(i) Df1.sort(by=‘City’)

(ii) Df1.sort_values(‘City’)

(iii) Df1.sort_values(by=‘City’)

(iv) Df1.sort_values(by==‘City’)

(c) Choose the right statement to get given output:

Hospitals Schools
count 4,000000 4,000000
mean 175.750000 7816.750000
std 27.584718 540.543785
min 149.000000 7226.000000
25% 155.000000 7519.250000
50% 173.000000 7766.500000
75% 193.000000 8064.000000
max 208.000000 8508.000000

(i) Df1.desc()

(ii) Df1.statistics()

(iii) Df1.desctibe()

(iv) Df1.showall()

(d) Chose the right function to fill in given statement to make the city as index value:

Df1._________________(‘City’,inplace=True)

(i) Df1.set_index(‘City’,inplace=True)

(ii) Df1.index('City',inplace=True)

(iii) Df1.new_index(‘City ‘,inplace=True)

(iv) Df1.reset_index(‘City’,inplace=True)

(e) Which Pandas command is used to rename the columns & index name of the above dataframe

(i) Df1.renamecolumns()

(ii) Df1.Rename()

(iii) Df1.rename()

(iv) Df1.indexrename()