Class 9 Cyber Olympiad - Sample question paper 15

Posted by Olympiad Tester on


Q) Which of the following SQL queries retrieves all records from the "students" table where the age is greater than 20?

        
            (A) SELECT * FROM students WHERE age > 20;
            (B) SELECT * FROM students WHERE age < 20;
            (C) SELECT * FROM students WHERE age >= 20;
            (D) SELECT * FROM students WHERE age <= 20;
        
    

Answer: A. SELECT * FROM students WHERE age > 20;

Explanation: This query retrieves records from the "students" table where the age is greater than 20.

Q) What will be the output of the following Python code?

        
            def calculate_sum(a, b):
                result = a + b
                return result

            num1 = 10
            num2 = 20
            total = calculate_sum(num1, num2)
            print(total)
        
    

Answer options:

A. 30

B. 1020

C. "1020"

D. Error

Answer: A. 30

Explanation: The code defines a function `calculate_sum` that adds two numbers and then calls this function with values 10 and 20, printing the result which is 30.

Q) Which of the following codes will add two numbers and display the sum in TextBox1 in Visual Basic? (Assume that the Name property of the TextBox is Text1)


            (A) Private Sub Command1_Click ( )
                Dim Num1, Num2, Result As Int
                Num 1 = 5;
                Num 2 = 8;
                Result = Num1 + Num2;
                Text1.Val = Result;
            End Sub

            (B) Private Sub Command1_Click ( )
                Dim Num1, Num2, Result As Integer
                Num1 = 5
                Num2 = 8
                Result = Num1 + Num2
                Text1.Text = Result
            End Sub

            (C) Private Sub Command1_Click ( )
                Dim Num 1, Num 2, Result as Integer
                Result = Num 1 + Num 2
                Text1.Val = Result
            End Sub

            (D) Private Sub Command1_Click ( )
                Dim Num1, Num2, Result As Int
                Num1 = 5;
                Num2 = 8;
                Result = Num1 + Num2;
                Val (Text 1. Text) = Result
            End Sub
        

Answer options:

A. Option A

B. Option B

C. Option C

D. Option D

Answer: B. Option B

Explanation: Option B correctly adds two numbers and displays the sum in TextBox1 in Visual Basic.

Q) Which of the following options makes it possible to scroll two documents at the same time in MS-Word 2016?

A. Simultaneous Scrolling

B. Synchronous Scrolling

C. Parallel Scrolling

D. View Scrolling

Answer: B. Synchronous Scrolling

Explanation: Synchronous Scrolling in MS-Word 2016 makes it possible to scroll two documents at the same time.

Q) ________ are types of computer viruses that store themselves within memory.

A. Resident viruses

B. Memo viruses

C. Trojan Horse

D. None of these

Answer: A. Resident viruses

Explanation: Resident viruses are types of computer viruses that store themselves within memory.

Q) What is the binary representation of decimal number 25?

A. 01010101

B. 00011001

C. 11001100

D. 01100110

Answer: B. 00011001

Explanation: The binary representation of decimal number 25 is 00011001.

Q) ________ of File Explorer shows the path of the currently selected folder in Windows 10.

A. Address bar

B. Status bar

C. Search box

D. None of these

Answer: A. Address bar

Explanation: The Address bar in File Explorer shows the path of the currently selected folder in Windows 10.

Q) In Visual Basic _________ control is used to accept input from the user as well as display the output.

A. Command

B. Shape

C. Timer

D. TextBox

Answer: D. TextBox

Explanation: In Visual Basic, the TextBox control is used to accept input from the user as well as display the output.

Q) What does the "visibility: hidden;" CSS property do?


            .hidden-element {
                visibility: hidden;
            }
        

Answer options:

A. Makes the element transparent.

B. Hides the element and leaves the space it occupies.

C. Removes the element from the document flow.

D. Changes the font color of the element to match the background color.

Answer: B. Hides the element and leaves the space it occupies.

Explanation: The "visibility: hidden;" property hides the element but preserves the space it occupies in the layout.

Q) What would be the output of the given HTML code?


            <table cellpadding=6 border=5 cellspacing=10>
            <tr height=50>
            <th>Graduation</th><th>Post Graduation</th>
            </tr>
            <tr height=50>
            <td width=30 valign=bottom>BCA</td><td>MCA</td>
            </tr></table>
        

Answer options:

A. A table with two rows and two columns, displaying "BCA" in the first cell and "MCA" in the second cell.

B. An error in the HTML code.

C. A table with one row and one column, displaying "BCA MCA" in the same cell.

D. A table with two columns, displaying "BCA" in the first column and "MCA" in the second column.

Answer: A. A table with two rows and two columns, displaying "BCA" in the first cell and "MCA" in the second cell.

Explanation: The HTML code creates a table with specified attributes, two rows, and two columns, displaying "BCA" in the first cell and "MCA" in the second cell.

Q) To embed a YouTube video in your HTML page, which HTML code would you use?

A. <embed src="youtube.com/video_id" width="640" height="360"></embed>

B. <iframe src="youtube.com/video_id" width="640" height="360"></iframe>

C. <video src="youtube.com/video_id" width="640" height="360"></video>

D. <object data="youtube.com/video_id" width="640" height="360"></object>

E. <youtube src="video_id" width="640" height="360"></youtube>

Answer: B. <iframe src="youtube.com/video_id" width="640" height="360"></iframe>

Explanation: The correct HTML code to embed a YouTube video is <iframe src="youtube.com/video_id" width="640" height="360"></iframe>.

Q) Which of the following types of RAM modules would you prefer to buy if you own a notebook computer or a small computer which has limited space?

A. SO-DIMM

B. RIMM

C. SIMM

D. SIPP

Answer: A. SO-DIMM

Explanation: SO-DIMM (Small Outline Dual Inline Memory Module) is a type of RAM module designed for small computers and notebooks where space is limited.

Q) Write a Python function to find the factorial of a given number.

        
            (A) def factorial(n):
                    result = 1
                    for i in range(1, n + 1):
                        result *= i
                    return result;

            (B) def factorial(n):
                    if n == 0 or n == 1:
                        return 1
                    else:
                        return n * factorial(n - 1)

            (C) def factorial(n):
                    result = n
                    while n > 1:
                        n -= 1
                        result *= n
                    return result

            (D) def factorial(n):
                    return 1 if n == 0 else n * factorial(n - 1)
        
    

Answer: D. def factorial(n): return 1 if n == 0 else n * factorial(n - 1)

Explanation: The provided function uses recursion to calculate the factorial of a given number.


← Older Post Newer Post →

POST YOUR COMMENT

    1 out of ...
    Sale

    Unavailable

    Sold Out