UG, S1 BCA, First internal examination, Introduction to Problem Solving and Web Designing, September 2024

 

INTRODUCTION TO PROBLEM-SOLVING AND WEB DESIGNING

ANSWER SCHEME

Section A

Answer all questions each carry 1 mark.

1.  URL means……………………………

Uniform resource locator

2.  Define IP address

 A unique address for identifying a device on the network

3.  IPV4 is of ………………….. bits

32

4.   Software that combines all object files and produces desired output is …………………

linker

5.   What is the purpose of the href attribute in an <a> tag?

           The href attribute specifies the URL of the page or resource that the link goes to

                                                                       (5x 1= 5 Marks)

Section B

Answer any 2 questions, each carry 5 marks.

6.   Illustrate the use of language translators and explain their types?

Language translators convert high-level programming code into machine language code that a computer can understand and execute.

Types of Language Translators:

Assembler: Converts assembly language to machine language.

Compiler: Translates the entire high-level code into machine code in one go, providing a list of errors after.

Interpreter: Translates high-level code to machine code line by line and stops at errors, which are corrected immediately.

Linker: Combines various compiled codes into a single executable.

Loader: Loads the executable into memory for execution. [5 Marks]

7. Explain the types of errors?

Syntax Errors: Occur when the rules of a programming language are violated (e.g., missing semicolon).

Runtime Errors: Errors that occur during program execution (e.g., dividing by zero).

Logical Errors: The program runs but produces incorrect results due to incorrect logic (e.g., wrong formula).

Compilation Errors: Detected during compilation (can be syntax or semantic errors).

Semantic Errors: Occur when the code is syntactically correct but doesn’t make sense in the context of the problem. [5 Marks]

8. Briefly explain different types of computer languages.

Low-level languages

·       Machine Language: The lowest level of programming language (binary), directly understood by the computer.

·       Assembly Language: A low-level language using symbolic code, which is easier to read than machine code.

High-Level Language: Languages like C, Java, and Python that are human-readable and need translation to machine code.

            (5 x 2= 10 Marks)

Section C

Answer any 1, 10 marks.

9.  Create a simple HTML web page that use basic HTML tags, lists, table and HTML form.

Basic html tags-heading tags, paragraph ,image,head,title etc (any 4-2marks)

 List-(any 1-2marks)

Table-(2 marks)

Form(4 marks)

 

Sample code

<!DOCTYPE html>

<html>

<head>

    <title>Simple HTML Page</title>

</head>

<body>

    <h1>Welcome to My Web Page</h1>

   

    <!-- Unordered List -->

    <ul>

        <li>Home</li>

        <li>About Us</li>

        <li>Contact</li>

    </ul>

 

    <!-- Ordered List -->

    <ol>

        <li>First Step</li>

        <li>Second Step</li>

        <li>Third Step</li>

    </ol>

 

    <!-- Table -->

    <table border="1">

        <tr>

            <th>Name</th>

            <th>Age</th>

            <th>Occupation</th>

        </tr>

        <tr>

            <td>John</td>

            <td>25</td>

            <td>Engineer</td>

        </tr>

        <tr>

            <td>Jane</td>

            <td>22</td>

            <td>Doctor</td>

        </tr>

    </table>

 

    <!-- Form -->

    <form action="/submit" method="post">

        Name: <input type="text" name="name"><br>

        Email: <input type="email" name="email"><br>

        <input type="submit" value="Submit">

    </form>

</body>

</html>

10. Write algorithm and flowchart for the following problems

          a). checking a person is eligible for vote or not.

b). Sum of three integers     

(a) Checking if a person is eligible to vote

Algorithm(2.5 marks)

  1. Start
  2. Input age of the person
  3. If age >= 18, display "Eligible to Vote"
  4. Else, display "Not Eligible to Vote"
  5. End

Flowchart (2.5 marks)

 



 (b) Sum of three integers

Algorithm: (2.5 marks)

  1. Start
  2. Input three integers A, B, and C
  3. Sum = A + B + C
  4. Display the sum
  5. End

Flowchart (2.5 marks)



                   (10 x 1 =10 Marks)

Comments