CBSE class 12 computer science python Assessment
Assessment-1
Class: XII
Subject: Computer Science
SECTION A
1- Identify the valid logical operator in Python:(1)
a) and b) %
2- Identify the valid identifier: (1)
a) else b) f_name
3- Name the Python Library modules which need to be imported to invoke the following functions: (2)
a) pow() b) time()
4- Rewrite the following code in python after removing all syntax error(s). Underline each correction done in the code: (3)
400 = fno
WHILE fno<=1000:
if fno<= 150:
print fno
fno= fno**4
else
print fno+2
fno= fno**2
5- Find and write the output of the following Python code: (3)
def display(p=5, t=10):
p=p*t
t=p*t
print (p, ‘@’,t)
p=4
r=5
q=display(p,r)
print (p, ‘*’,r)
r=display(r)
print (p, ‘#’,r)
p=display(p)
print(p, ‘&’,r)
SECTION B
6- Find out the output of the following code: (3)
a=35
def display ():
print (a)
global a
a=20
b=40
print (a)
display()
7- Find out the output of the following code: (2)
t,r=6,5
t,r,t=t+5,r+16, t-1
print (t,r)
8- Rewrite the following code in python after removing all syntax error(s). Underline each correction done in the code. (2)
def cal (a,b)
c=a+b
return c
a1=3
5=b1
c1=cal(a1,b1)
print [c1]
9- What is the difference between the formal and actual parameters? Explain with example.(2)
SECTION C
10- 85:03:63 2E FC is an example of _________ address. (1)
11- ________is a network device that connects dissimilar networks. (1)
12- __________is a technology that connects the things to the Internet over wired or wireless connections.(1)
13- ____________is a query command that is used to get some information on a specific domain name, such as who registered when was it registered and when the domain will expire.(1)
14- Write the expanded names for the following abbreviated terms used in Networking And Communications:(4)
a) SMTP
b) Voip
c) RFID
d) NFC
SECTION D
15- CASE STUDY BASED QUESTION – (4)
Ayurveda Training Educational Institute is setting up its center in Hyderabad with four specialized departments for Orthopedics, Neurology and Pediatrics along with an administrative office in separate buildings. The physical distance between these department buildings and the number of computers to be installed in these departments and administrative office as given as follows .You as a network expert have to answer the queries as raised by them in i) to iv).
Shortest distances between various locations in meters:
Administrative Office to Orthopedic Unit | 55 |
Neurology Unit to Administrative Office | 30 |
Orthopedic Unit to Neurology Unit | 70 |
Pediatrics Unit to Neurology Unit | 50 |
Pediatrics Unit to Administrative Office | 40 |
Pediatrics Unit to Orthopedics Unit | 110 |
Numbers of Computers installed at the various locations are as follows:
Pediatrics Unit | 40 |
Administrative Office | 140 |
Neurology | 50 |
Orthopedic Unit | 80 |
i) Suggest the most suitable location to install the main server of this institution to get efficient connectivity.
ii) Suggest the best cable layout for effective network connectivity of the building having server with all the other buildings.
iii) Suggest the devices to be installed in each of these buildings for connecting computer installed within the building out of the following:
a) Gateway, b) Modem, c) Switch
iv) Suggest the network cable for efficiently connecting each computer installed in each of the buildings out of the following Network Cable : Single Pair Telephone Cable, Coaxial Cable, Ethernet Cable
SECTION-E
16- What do you mean by cardinality and degree? If a new column contact no. has been added and two more members have joined the club then how these change will affect the degree and cardinality of the table.(2)
17- Differentiate between Primary key and Foreign Key.(2)
18- Write down any two advantages of using Databases.(2)
19- Answer the question based on the table given below:
TABLE: Student
Column Name | Data Type | Size |
Roll_No | INTEGER | 4 |
Name | CHAR | 20 |
Stipend | CHAR | 7 |
Stream | CHAR | 15 |
Grade | CHAR | 1 |
i) Write the SQL command to create the above table. (2)
ii) Insert one record with relevant information, in the table student.(1)
iii) Display all the records of the table Student.(1)
iv) Delete the Student Whose Roll no is 100.(1)
v) Change the Stream of Student to ‘Computer’ Whose Roll no. is 536.(1)
vi) Add one column email of data type CHAR and size 30 to the table student.(1)
20- Answer the question based on the table given below:
TABLE: HOSPITAL
No. | Name | Age | Department | DateoFadm | Charges | Sex |
1 | Arpit | 62 | Surgery | 21/01/98 | 300 | M |
2 | Zareena | 22 | ENT | 12/12/97 | 250 | F |
3 | Kareem | 32 | Orthopedic | 19/02/98 | 200 | M |
4 | Arun | 12 | Surgery | 11/01/98 | 300 | M |
5 | Zubin | 30 | ENT | 12/01/98 | 250 | M |
6 | Ketaki | 16 | ENT | 24/02/98 | 250 | F |
7 | Ankita | 29 | Cardiology | 20/02/98 | 800 | F |
8 | Zareen | 45 | Gynecology | 22/02/98 | 300 | F |
9 | Kush | 19 | Cardiology | 13/01/98 | 800 | M |
10 | Shilpa | 23 | Nuclear Medicine | 21/02/98 | 400 | F |
i) To list the names all the patients admitted after 15/01/98.(1)
ii) To list the names of female patients who are in ENT department.(1)
iii) To list names of all patients with their date of admission in ascending order.(1)
iv) To display Patient’s Name, Charges, Age for only female patients.(1)
v) Find Out the Output of Following SQL Command:-(2)
a) Select COUNT(DISTINCT charges) from HOSPITAL;
b) Select MIN(Age) from HOSPITAL where Sex=”F”;