Practice C.1 Creating the web with authentic IB Computer Science (CS) exam questions for both SL and HL students. This question bank mirrors Paper 1, 2, 3 structure, covering key topics like programming concepts, algorithms, and data structures. Get instant solutions, detailed explanations, and build exam confidence with questions in the style of IB examiners.
A health organization, MedData, has created a database of patient information accessible through its web portal. MedData uses a secure connection and strict protocols to protect sensitive information.
The MedData portal is accessible at https://meddata.org. (i) State the protocol used in this URL.
Explain why MedData would use HTTPS rather than HTTP for its portal.
Outline how a URL like https://meddata.org/login helps users access specific resources on a web server.
MedData’s web application connects to a backend database for patient information. Describe two benefits and one challenge of integrating a web page with a database for this application.
A public transportation system, CityTransit, uses an online portal to provide schedules, updates, and service alerts to users.
The website is accessible at http://citytransit.org. (i) Identify the protocol in this URL.
The website is accessible at http://citytransit.org. (ii) Explain why CityTransit might consider upgrading to HTTPS.
Describe two ways that CSS contributes to improving the user experience on the CityTransit website.
CityTransit allows users to search for routes using a search function that relies on JavaScript. Explain how JavaScript enhances the functionality of the search feature on the website.
The internet and World Wide Web are often considered to be the same, or the terms are used in the wrong context.
Many organizations produce computer-based solutions that implement open standards.
A search engine is software that allows a user to search for information. The most commonly used search algorithms are the PageRank and HITS algorithms.
Outline why a search engine using the HITS algorithm might produce different page ranking from one using the PageRank algorithm.
Outline two advantages of using open standards.
Web crawlers browse the World Wide Web.
Explain how data stored in a meta-tag is used by a web crawler.
Distinguish between the internet and the World Wide Web.
Here's the formatted question in markdown:
Pugh University has a website that allows computer science students to enter their name and customize the web pages.
Consider the section of HTML and CSS code shown below.
File name: index.html
<!DOCTYPE html>
<html>
<body>
<script>
function setVar(){
var subject=document.getElementById('kippers').value;
document.getElementById('subj').innerHTML = subject;
}
</script>
<h2>My First Page</h2>
<p>Welcome to the <span id='subj'></span> Faculty</p>
<input type='text' id='kippers'/>
<button onclick='setVar();'/>clickme</button>
</body>
</html>
When a student enrolls, they must enter their name on a web page. Before being added to the database, the system should check that the name typed is not blank and that it has not already been added to the database.
Consider the following URL:
The common gateway interface (CGI) offers a standard protocol for web servers.
Pugh University uses cloud computing services, such as Google Docs or Office 365.
Describe how cloud computing is different to a client–server architecture.
Describe the working of the common gateway interface (CGI).
Explain why these two validation checks occur on different computer systems.
Describe the processing that takes place when the user inputs “Pugh” into the text box and then uses the clickmebutton.
Explain how website certificates are used to authenticate a user’s browser through secure protocol communications like HTTPS.
State the output of the index.htmlfile in the web browser.
Here's the properly formatted question in markdown:
BesTea is a company that sells tea and tea-related accessories online. Users browsing the website encounter the following URL:
https://www.BesTea.com/customer/pages/delivery
A person enters the URL for BesTea into their browser.
The logos of the credit and debit cards accepted by BesTea are displayed as images in the footer of all of its web pages.
The BesTea website includes a shopping basket facility that enables users to make purchases.
The following fragment of PHP code is present in the script that allows users to place a completed order:
<?php
...
$_SESSION['sessionUserID'] = new_random_number();
$query = $db -> query ('SELECT * FROM users_db WHERE id = '
.$_SESSION['sessionUserID']);
$userRecord = $query -> fetch_record();
...
>
Note: The question appears to be properly formatted already. I've maintained all the existing formatting including:
Users may perform several actions on their shopping baskets. These actions require interaction with a central database of products. Each record in this database includes the identifier, the name and the price of one of these products.
Consider the following fragment of code:
<
$basket = new Basket
…
If 'action' == 'removeBasketItem' && !empty(_REQUEST){
remove(_REQUEST);
header('view_basket.php');
}
>
From the code, identify the information that the user has provided.
Outline how the footer of a web page can be made identical across all pages of a website.
Describe how this URL provides security in communication over the Internet.
Suggest the function of this fragment of code.
Identify the steps that the Domain Name System (DNS) server will take in order to locate the correct IP address for this request from the browser.
Domain Name Systems (DNS) fundamental components of communication.
Describe the function of DNS in web communication.
Explain why DNS is necessary for users to access websites by name instead of by IP address.
Open source code is made available by a community of developers and is frequently updated. The code can be downloaded for free, but users must register with the website and have their access authenticated.
Authentication is based on signing in to an established third-party company, for example a user’s existing email or a social network account. The third-party company then verifies the user, granting them access to the open source code website.
The URL of this website is www.OpenSourceDev.org. Any new pieces of code that the developers make available become new resources on the website. A script generates weekly automatic notifications of new code available on the site, and sends this notification to users as an email.
Explain how the user’s privacy can be maintained whilst using this method of authentication.
Outline the steps that the script could perform for sending out these notifications.
Outline, with an example, how the URL for these new pieces of code will be generated.
A fragment of a script and a web form are provided below.
In the script some functions are not implemented, and only their specification is provided.
Describe the processing that occurs when the form is filled with the URL https://www.the2nd.org/bin.php?id=70 that the server discovers is associated with the IP address 172.16.254.1.
Evaluate the use of server-side scripting to provide the mechanism for registration.
Here's the formatted question in markdown:
A web application (app) runs on mobile devices such as smartphones and tablets. It allows users to locate their position in real time on a map, as they walk around a city, as well as the surrounding attractions. The app uses icons to represent tourist attractions such as art galleries and museums. When the user clicks on the icon, further details are shown, such as opening times. The app includes some use of client-side scripting.
Many art galleries have websites that can be found by search engines. White hat techniques and practices allow website developers to optimize the search process. It is good practice to maintain the source code of websites up-to-date with actual information.
Explain why maintaining a clean HTML source code of a website by removing old information optimizes the search process.
State two metrics used by search engines.
With reference to the use on mobile devices, outline a feature of this application that may rely on client-side scripting.
The evolution of the web, architectures, protocols and their uses has led to increasingly sophisticated services that run on peer-2-peer (P2P) architectures.
Explain how a P2P network can provide more reliability than a client-server model.
Outline the functioning of this app. Include specific references to the technology and software involved.
The following snippet shows a simplified HTML document with embedded CSS.
<html>
<head>
<style>
.header {
color: blue;
font-size: 24px;
}
</style>
</head>
<body>
<h1 class="header">Welcome to Web Science</h1>
</body>
</html>
State the purpose of the class attribute in this HTML code.
Describe the effect of the CSS code on the <h1> element in the browser.
Outline one benefit of separating CSS from HTML.
Home banking allows individuals to perform operations over the Internet on their own bank accounts.
Access to a bank's home banking services requires, as a first step, identification and authentication of the user. Individuals log on the bank web site, and enter their own personal space by providing their full account number and a personal code that the bank gave them. The processing of this information takes place on the server side.
State two features that make HTTPS more suitable than HTTP in the context of home banking.
Explain why server-side processing is used in this case.
The 20 most recent account transactions can be displayed on screen in a webpage that uses XML. A print-out of all transactions of the past three months may be obtained by clicking an onscreen button on the webpage. The print-out is landscape oriented and shows many more columns than are displayed on the screen.
Describe how this processing takes place with reference to the use of XML and XSLT.
Outline the relationship between the Internet and the world wide web (WWW).
Explain why the choice of browser should not affect a customer’s ability to access their bank account details.