Internet-based programming questions and answers have become a go-to resource for developers and learners seeking solutions to their coding problems. With the vast amount of information available on the internet, programmers and learners can easily find answers to their questions and learn from other developers’ experiences and from past examination questions. In this blog post, we will explore the common questions and providing answers and provide tips on how to answer the most of them. Whether you’re a learner or an experienced developer, internet-based programming questions and answers can help you improve your coding skills and become a more efficient programmer.
So, let’s get started and dive into some of the most frequently asked questions with answers.
Questions courtesy of KNEC November 2021 DICT module 3 IBP KNEC past paper
Internet based programming questions and answers
1a)explain each of the following terms as used on the internet. (6 Marks)
- Web documents;
- Web servers;
A web server is a computer program that stores web documents and makes them available over the internet. When a user requests a web page, the web server retrieves the requested document and sends it back to the user’s web browser. Web servers use protocols like HTTP and HTTPS to communicate with web browsers and transfer web documents. Web servers can be hosted by organizations or individuals, and can be accessed by anyone with an internet connection.
Protocols are a set of rules that define how computers and other devices communicate with each other over a network. In the context of the internet, protocols are used to transfer data between web browsers and web servers. The most common protocol used for web communication is HTTP (Hypertext Transfer Protocol), which is used to request and transfer web documents. HTTPS (Hypertext Transfer Protocol Secure) is an encrypted version of HTTP that provides additional security for web communication. Other protocols used in internet communication include FTP (File Transfer Protocol), SMTP (Simple Mail Transfer Protocol), and TCP/IP (Transmission Control Protocol/Internet Protocol).
b) explain the functions of each of the following applications in web design. Database tools; graphic editors;(4 Marks)
Database tools are software applications that are used to create, manage, and manipulate databases. In web design, database tools are used to store and manage large amounts of data for websites or web applications. They allow website owners to create, update, and delete content, user information, and other data that is required for the website to function properly. Database tools such as MySQL, Microsoft SQL Server, and Oracle Database are commonly used in web design.
Graphic editors are software applications used to create and edit digital images, illustrations, and graphics. In web design, graphic editors are used to create visual elements such as logos, icons, and graphics that are used on websites. They allow web designers to manipulate images, adjust color and contrast, add text, and create custom graphics. Graphic editors such as Adobe Photoshop, Sketch, and GIMP are commonly used in web design. Additionally, vector graphic editors such as Adobe Illustrator and Inkscape are used to create scalable graphics such as logos and icons that can be resized without losing image quality.
c)Distinguish between a static website and a dynamic website as used in the internet(4 Marks)
A static website and a dynamic website are two different types of websites used in the internet. The main differences between these two types of websites are how they are created and how they are updated.
A dynamic website is a website that contains web pages whose content can be changed automatically based on the user’s input or other parameters. Dynamic websites are created using server-side scripting languages such as PHP, ASP.NET, or Java. These websites are suitable for websites that require frequent updates or user interactions such as online shopping sites, social media websites, or news websites.
d)Write an html code that will display the following listed items as they appear when run on a web browser.(6 Marks)
<!DOCTYPE html> <html> <head> <title>Kenya History and Future</title> </head> <body> <h2>A. History of Kenya</h2> <ol> <li>Post-independence period</li> <li>The Turkana fossils <ul> <li>The missing links</li> <li>The early man</li> </ul> </li> <li>Early history</li> </ol> <h2>B. Future of Kenya</h2> <h3>Kenya</h3> <p>A country lies across the equator on the east coast of Africa</p> <h3>Fossils</h3> <p>The remains of pre-historic plant or animal embedded in rock.</p> </body> </html>
2a)Explain the functions of common Gateway interface (CGI) in the internet (2 Marks)
Common Gateway Interface (CGI) is a standard protocol that allows web servers to execute programs or scripts on the server and generate dynamic content in response to user requests. CGI provides a mechanism for web servers to communicate with external programs or scripts and pass data back and forth between the two.
b)Explain the role of each of the following body tags attributes: (6 Marks)
- link: This attribute is used to define the color of unvisited links in the document. For example, if you set link=”blue”, all unvisited links in the document will be displayed in blue.
- vlink: This attribute is used to define the color of visited links in the document. For example, if you set vlink=”purple”, all links that have been visited by the user will be displayed in purple.
- alink: This attribute is used to define the color of active links in the document. Active links are links that the user is currently clicking on. For example, if you set alink=”red”, all links that are currently being clicked on will be displayed in red.
c)Skynote is a company whose core function is to develop enterprise web applications for its clients.
i)Explain three advantages that the company would realize by using server-side programs when creating these web applications.(6 Marks)
- Increased security: Server-side programs can help Skynote improve the security of their web applications by processing sensitive data on the server-side rather than on the client-side. This can help prevent security vulnerabilities that may arise from client-side scripting or manipulation of data on the client-side. Skynote can also use server-side programs to implement user authentication and access control, which can further enhance the security of their web applications.
- Better scalability and performance: Server-side programs can help Skynote improve the scalability and performance of their web applications by reducing the amount of data that needs to be transferred between the client and the server. This can help minimize network latency and reduce server load, resulting in faster and more responsive web applications. Server-side programs can also help Skynote optimize their web applications by caching frequently accessed data or pre-generating dynamic content, further improving their performance and scalability.
ii)list three examples of server-side programs that the company could be using(3 Marks)
- PHP: PHP is a server-side scripting language that is widely used for web development. It can be embedded in HTML and used to generate dynamic content on the server-side. PHP is easy to learn and has a large community of developers, making it a popular choice for web development.
- Ruby on Rails: Ruby on Rails is a web application framework that uses the Ruby programming language. It provides a set of tools and conventions for building web applications quickly and efficiently. Ruby on Rails is known for its simplicity and elegance, making it a popular choice for startups and small businesses.
3ai)Outline the functions of each of the following tags as used in HTML (4 Marks)
<address> <button> <code> <source>
- <address>: This tag is used to define contact information for the author or owner of a document. It is typically used at the bottom of a web page or document. The <address> tag is often used to display the author’s name, address, phone number, and email address. It can also be used to provide a link to the author’s website or social media profile.
- <button>: This tag is used to create a clickable button on a web page. The <button> tag is often used in forms to submit data or to trigger an action on the page. It can also be used to create custom buttons with text or images. The <button> tag can be styled using CSS to change the appearance of the button.
- <code>: This tag is used to define a block of code or a code snippet on a web page. The <code> tag is often used to display programming code, markup language, or other types of code that need to be displayed verbatim. The <code> tag can be used in combination with the <pre> tag to preserve the formatting of the code and display it in a monospaced font.
- <source>: This tag is used in conjunction with the <video> and <audio> tags to define the source of the media file to be played on a web page. The <source> tag is used to specify the URL of the media file and the file format, allowing the browser to select the appropriate format for the user’s device and browser. Multiple <source> tags can be used for the same media file to provide fallback options for different browsers and devices.
ii)Identify web browsing software from the following list; adobe dreamweaver, fireworks, opera, google chrome, microsoft edge, microsoft frontpage, mozilla firefox, MS outlook(2 Marks)
The web browsing software from the following list are:
- Google Chrome
- Microsoft Edge
- Mozilla Firefox
b)A manufacturing company opted to develop a website for advertising their products. Outline four benefits the company would derive from the use of the website(4 Marks)
- Increased visibility and reach: Having a website allows the manufacturing company to reach a wider audience beyond its physical location. Customers from all over the world can access the website, learn about the company’s products, and make purchases online. This can help increase the company’s visibility and reach, leading to more sales and revenue.
- Cost-effective marketing: Advertising products through a website can be a cost-effective marketing strategy for a manufacturing company. Unlike traditional marketing methods such as print ads, billboards, and TV commercials, creating and maintaining a website is relatively inexpensive. A website can also be easily updated with new products, promotions, and information, allowing the company to keep customers informed and engaged.
- Improved customer engagement: A website can provide a platform for customers to engage with the manufacturing company and its products. Customers can ask questions, leave feedback, and share their experiences with the company’s products. This can help the company build relationships with customers and gain valuable insights into their needs and preferences.
- Competitive advantage: Having a well-designed and user-friendly website can give a manufacturing company a competitive advantage in the marketplace. A website that is easy to navigate, loads quickly, and provides valuable information and resources can help the company stand out from its competitors. It can also help the company build a strong brand identity and reputation, leading to increased customer loyalty and repeat business.
c)Distinguish between checkboxes and radio buttons controls as used in HTML forms(4 Marks)
- Checkbox controls: A checkbox control is a form control that allows the user to select one or more options from a list. Checkbox controls are typically used when the user needs to make multiple selections from a list of options. Each checkbox control is independent of the others, meaning the user can select or deselect each option as desired. Checkbox controls are represented by a small box that can be checked or unchecked by the user.
- Radio button controls: A radio button control is a form control that allows the user to select one option from a list. Radio button controls are typically used when the user needs to make a single selection from a list of options. Unlike checkbox controls, radio button controls are dependent on each other, meaning the user can only select one option from the list. Radio button controls are represented by a small circle or button that can be selected by the user.
4a)Outline four uses of <meta> in html(4 Marks)
- Setting character encoding: The <meta> element can be used to specify the character encoding of the web page, which affects how the browser interprets and displays the content. This is done using the charset attribute, which specifies the character encoding scheme to use.
- Setting viewport properties: The <meta> element can be used to set the viewport properties of a web page, which control how the page is displayed on different devices with different screen sizes. This is done using the viewport attribute, which allows you to specify things like the width of the viewport, the initial zoom level, and whether the page should be scaled to fit the screen.
- Setting page description and keywords: The <meta> element can be used to provide a description of the page and a set of keywords that can be used by search engines to index the page. This is done using the description and keywords attributes, respectively.
- Setting author and copyright information: The <meta> element can also be used to provide information about the author of the page, as well as copyright and other legal information. This is done using the author, copyright, and publisher attributes, among others
bExplain the functions of each field below used in web authoring tool dialog box;(6 Marks)
- iii) tab index
- Text: This field is used to enter or edit the text content of an element. For example, if you are creating a paragraph element, you can use the Text field to enter the text that will be displayed within that element. Similarly, if you are creating a button element, you can use the Text field to specify the text that will be displayed on the button.
- Target: This field is used to specify where a link or form will open when clicked or submitted, respectively. The most common targets are “_blank”, which opens the link or form in a new browser window or tab, and “_self”, which opens the link or form in the same window or tab. Other targets are also available, such as “_parent” and “_top”, which control how the link or form is displayed in frames or iframes.