Page 19 - IPP-12-2025
P. 19
Data in static websites does not change until someone changes it manually; hence, data is static in nature.
On the other hand, dynamic websites interact with the user accessing the site and render content in real
time depending on the user’s actions or settings due to which it does not remain the same on every call,
which makes data dynamic in nature.
26. Differentiate between DROP and DELETE commands. [2]
Ans. DROP Command:
(i) It is used to physically remove a table with all records stored in it.
(ii) It is a DDL (Data Definition Language) command.
(iii) It frees the memory occupied by the table.
DELETE Command:
(i) It is used to delete all records or some of the records from a table without deleting the table.
(ii) It is a DML (Data Manipulation Language) command.
(iii) The memory occupied by the table is not free even if we delete all the rows of the table.
27. List any four health hazards related to excessive use of technology. [2]
Ans. (i) Wrong posture or long hours of sitting in an uncomfortable position causes muscle or bone injury.
(ii) Bright light of smartphones or computers blocks a hormone called melatonin which helps us sleep.
Thus, we can experience sleep disorders leading to short sleep cycles.
(iii) Using headphones or earphones for a prolonged period of time and at high volume can cause hearing
problems and may lead to hearing impairment in severe cases.
(iv) Prolonged hours of screen time can lead to extreme strain on the eyes.
28. Priyank is trying to create a dictionary and convert it into a dataframe using Pandas but his code contains
mistakes. Identify the errors, rewrite the correct code and underline the corrections made. [2]
import pandas as pd
info = {'EmpName': ['Erica', 'Mayra', 'Rihaan'], Score: [17, 22, 19]}
dataframe = PD.dataFrame(info)
print(Dataframe)
Or
Complete the given Python code to get the required output (ignore the dtype attribute) as:
Output:
Tomato 50
Carrot 30
Cucumber 40
Code:
import as pd
quantities = [50, 30, 40]
vegetables = ['Tomato', 'Carrot', ]
vegetable_series = pd. (quantities, index= )
print( )
Ans. import pandas as pd
info = {'EmpName': ['Erica', 'Mayra', 'Rihaan'], 'Score': [17, 22, 19]}
dataframe = pd.DataFrame(info)
print(dataframe)
Or
import _pandas as pd
quantities = [50, 30, 40]
vegetables = ['Tomato', 'Carrot', 'Cucumber']
vegetable_series = pd.Series(quantities, index=vegetables)
print(vegetable_series)
Model Test Paper M.16
35