Page 17 - IPP-12-2024
P. 17
Static Web page Dynamic Web page
Static web page displays the fixed content that Dynamic web page content can be dynamically
1.
remains the same for all the users. generated based on user requests/actions.
It has limited interactivity; users’ interactions are It has high interactivity; users’ interactions are not
2.
predefined. predefined.
3. Example: Basic information providing websites Example: Online shopping websites
20. The Python code written below has syntactical errors. Rewrite the correct code and underline the corrections
made. (2)
import panda as pd
profit=[500,300,800,1500]
indx=['Google','Microsoft','Mindtree','Wipro'
company=series(profit,index=inx)
print(company[company>500])
Ans. import pandas as pd
profit=[500,300,800,1500]
indx=['Google','Microsoft','Mindtree','Wipro']
company=pd.Series(profit,index=indx)
print(company[company>500])
21. Consider the given SQL string: (2)
"123*345_Cabo ***#$"
Write suitable SQL queries for the following:
(i) Returns the position of the first occurrence of the substring "*" in the given string.
(ii) To extract the first 7 characters from the given string.
Ans. (i) SELECT INSTR("123*345_Cabo ***#$", "*");
(ii) SELECT LEFT("123*345_Cabo ***#$", 7);
22. Predict the output of the following Python code: (2)
import pandas as pd
S1=pd.Series([36,61,19,28],index=['i','ii','iii','iv'])
S2=pd.Series(30, index=['I','II','III','IV'])
print(S1[ : 2]*100)
Ans. (i) 3600 (ii) 6100
23. What is Plagiarism? Write any two measures to avoid plagiarism. (2)
Ans. Plagiarism means copying someone else’s work or information without giving them credit for it or any
prior acknowledgement. It is an act of stealing.
Two measures to avoid plagiarism are as follows:
(a) Use your own words and ideas.
(b) Always give preference or credit to the source from where you have received your information.
24. Complete the given Python code to get the required output as: Physics Maths
import _________ as pd (2)
s=pd.Series([95,89,92,95],index=['IP','Physics','Chemistry','Maths'])
print(__________, ___________)
4 MODEL TEST PAPER