Sie sind auf Seite 1von 2

NILGIRI HILLS PUBLIC SCHOOL

RE-TEST PRE BOARD EXAM –I(2019-20)


CLASS :XII
TIME:1.5 HRS COMPUTER SCIENCE MM:40

Q1. Explain the difference between degree and cardinality of a relation in MySql. (2)
Q2. Which command is used to remove redundancy/ duplicity from select query? Expian giving example.
(2)
Q3. Identify DDL and DML queries amongst the following:- (2)
i) Drop
ii) Alter
iii) update
iv) create
Q4. What are the two characters we can use with like operator? Explain giving examples. (2)
Q5. Explain : i) Primary Key ii) Alternate Key (2)
Q6. Write SQL queries for (i) to (iv) and outputs for (v) to (viii):

(i) Write the data types of SID and DOB columns. (1)
(ii) Display names of Salespersons and their Salaries who have salaries in the
range 30000.00 to 40000.00. (1)
(iii) To list Names, Phone numbers and DOB (Date of Birth) of Salespersons who were born
before 1st November, 1992. (1)
(iv) To display Names and Salaries of Salespersons in descending order ofsalary.
(1)
(v) To display Names of Salespersons who have the word ‘Kumar’ anywhere in their names.
(1)
(vi) SELECT Name, LENGTH(Name) FROM Salesperson; (1)
(vii) SELECT Area, Name fom Salesperson where area in(“north”, “south”); (1)
(viii) SELECT sum(Salary) FROM Salesperson where area=’North’; (1)
Q7. Write a recursive code to find factorial of a number. (3)
Q8. What is the difference between Recursion and iteration? Explain giving examples. (2)
Q9. Which command is used for the following cases in Django (3)
i. To create a Django project “Mysite”
ii. To create a an app “details “ in “Mysite”
iii. To run the server in virtual environment
Q10. Write to create a pie for sequence con=[23.4,17.8,25,34,40] for
zones=[‘east’,’west’,’north’,’south’,’central’]. (3)
• Show North zone value exploded.
• Show % contribution for each zone.
• The pie chart should be circular.

Q11. Consider the data given below: (3)


App Name App price in Rs Total Downloads
Angry Birds 75 197000
Teen Titan 120 209000
Marvel Comics 190 414000
Color Me 245 196000
Fun Run 550 272000
Crazy Taxi 55 311000
Igram Pro 175 213000
Wapp Pro 75 455000
Maths Formulas 140 278000

Using the above data ,plot the following:


(a) A line chart depicting the prices of apps.
(b) A bar chart depicting the downloads of apps.
(c) The charts should have proper titles for charts axes ,legends etc.

Q12. Write a program to count number of upper-case alphabets present in a text file “Article.txt”. (2)
Q13. Write a program that copies a text file “source.txt” onto “target.txt” barring the lines starting with
“@” sign. (2)
Q14. What possible outputs(s) are expected to be displayed on screen at the time of execution of the
program from the following code? Also specify the maximum values that can be assigned to each of the
variables FROM and TO. (2)
import random
AR=[20,30,40,50,60,70];
FROM=random.randint(1,3)
TO=random.randint(2,4)
for K in range(FROM,TO+1):
print (AR[K],end=”#“)

(i) 10#40#70# (ii) 30#40#50#


(iii) 50#60#70# (iv) 40#50#70#

Q15. Write the output for the following code: (2)


def increment():
n.append([49])
return n[0], n[1], n[2], n[3]
L=[23,35,47]
M1 , m2 , m3, m4 = increment(L)
print (L)
print (m1 ,m2, m3, m4)
print (L[3]==m4)

Das könnte Ihnen auch gefallen