Page 374 - Informatics_Practices_Fliipbook_Class12
P. 374
28. Write SQL statements to:
i. create a database named SCHOOL.
ii. create a table named STUDENT based on the following specification:
Column Name Data Type Constraints
Admno Integer Primary Key
Name Varchar(20)
Grade Varchar(10)
29. Aarav uses computer and mobile for his personal use.
i. Aarav got the message on WhatsApp that CBSE is announcing the result of class XII the next day at 12:00 pm.
He forwarded the message to a few of his friends. But later he came to know that no such announcement was
there on the CBSE official website. In this case, what is he violating?
ii. Aarav is receiving offensive messages from an unidentified number. What type of cybercrime victimization
does this situation represent?
OR
Ms Smantha has many electronics gadgets which are not usable due to outdated hardware and software. Help her
to find three best ways to dispose off the used electronic gadgets.
30. Write the python statement to create a DataFrame df using the following dictionary.
dataDict = {
'B_NO': [1, 2, 3, 4],
'Name': ['Sunil Pillai', 'Gaurav Sharma', 'Piyush Goel', 'Kartik Thakur'],
'Score1': [90, 65, 70, 80],
'Score2': [80, 45, 90, 76]
}
Also, write python code to perform the following operations on the DataFrame df:
a. Add both the scores of a batsman and assign to column "Total".
b. Display the highest score in both Score1 and Score2.
c. Display the first two rows of df.
Section-D
31. Consider the table ITEM given below:
SNo Itemname Type Price Stockdate
1 Chaises Living 11500.58 2020-02-19
2 Accent Chairs Living 31000.67 2021-02-15
3 Baker Racks Kitchen 25000.62 2019-01-15
4 Sofa Living 7000.30 2020-10-18
5 Nightstand Bedroom 1120.50 2021-07-23
Write SQL statements to:
i. display all the records in descending order of Stockdate.
ii. display the total price for each item type. The Type and total number of items of each Type.
iii. Display the least Price.
360 Touchpad Informatics Practices-XII

