Page 6 - IPP-12-2024
P. 6
Section B
19. What is the difference between Static and Dynamic web pages? Give examples. [2]
Or
Define Web Server and Web Hosting.
Ans. Static Web Pages: Static Web Pages are simple and use languages like HTML, JavaScript and CSS. When a
server gets a request for a static web page, it directly sends it to the client without extra processing. These
pages are viewed in web browsers and remain the same until manually updated.
Dynamic Web Pages: Dynamic Web Pages are complicated, written in languages such as CGI, AJAX, ASP,
ASP.NET, etc. In dynamic web pages, the content of pages is different for different users. It takes more time
to load than a static web page. Dynamic web pages are used where the information is changed frequently;
for example, stock prices, weather information, etc.
STEP 1: HTTP REQUEST
Web Web
Browser Server
STEP 4: HTTP RESPONSE
STEP 2: Calls an
STATIC WEB PAGE application program
in response to the HTTP
STEP 3: The program request
executes and produces HTML
outputs
Dynamic web page
Or
Web Server: A Web Server is used to store and deliver the contents of a website to clients such as a
browser that requests it. A web server can be software or hardware. When talking about a web server
as computer hardware, it stores web server software and a website’s contents (HTML pages, images, CSS
stylesheets and JavaScript files). The server needs to be connected to the internet so that its contents can
be made accessible to others. When talking about a web server as software, it is a specialised program that
understands URLs or web addresses coming as requests from browsers and responds to those requests.
Web Hosting: Web Hosting is a service that allows organizations and individuals to post a website or web
page onto the server, which can be viewed by everyone on the internet.
20. Fill in the blanks to produce the output. [2]
import pandas as pd
L1=['Abhay','Rubina','Ramandeep','Sonam']
L2=[35,56,48,85]
df=pd.DataFrame([L1,L2],_____________ , _______________)
print(df)
OUTPUT
First Second Third Fourth
a Abhay Rubina Ramandeep Sonam
b 35 56 48 85
Ans. index=['a','b'], columns=['First','Second','Third','Fourth']
21. Differentiate between Single Row functions and Aggregate functions with an example of each. [2]
Ans. • Single Row function is applied on each row while aggregate functions are applied on the group of rows.
• Single row functions return multiple outputs, i.e., output based on each row while aggregate function
returns only one result, i.e., output based on a group of rows.
Single row function example is: SELECT UPPER('hello') AS 'UppercaseString';
Aggregate function example is: SELECT SUM(Salary) AS 'TotalSalary' FROM Employee;
A.28 Informatics Practices with Python–XII