Self Studies

Computer Science Test - 25

Result Self Studies

Computer Science Test - 25
  • Score

    -

    out of -
  • Rank

    -

    out of -
TIME Taken - -
Self Studies

SHARING IS CARING

If our Website helped you a little, then kindly spread our voice using Social Networks. Spread our word to your readers, friends, teachers, students & all those close ones who deserve to know what you know now.

Self Studies Self Studies
Weekly Quiz Competition
  • Question 1
    5 / -1

    Two statements are given below:

    Statement I: Normalization is the process of organizing data in a database into tables to reduce redundancy.

    Statement II: Normalization is the process of organizing data in a database into tables to reduce dependancy.

    Solution

    Normalization is a process that is used to eliminate redundant data and to ensure that data is stored in a way that minimizes data dependency. It involves dividing a larger table into smaller tables and defining relationships between them to reduce data redundancy and improve data integrity.

     

  • Question 2
    5 / -1

    ________ is world wide interoperability for microwave access, uses a larger spectrum to deliver connections to various devices.

    Solution

    The correct answer is WiMax

    Key Points

    • WiMax stands for Worldwide Interoperability for Microwave Access.
    • It's a wireless technology designed to provide broadband internet access over a large area.
    • Wi-Fi, while also wireless, offers connectivity to a local network with a shorter range.

     

  • Question 3
    5 / -1

    Directions For Questions

    Examples of Guided media are _______.

    A. Radio Waves

    B. Optical - fiber

    C. Micro waves

    D. Twisted pair

    E. Coaxial cable

    ...view full instructions

    Choose the correct answer from the options given below:

    Solution

    The correct answer is B, D and E only

    Key Points

    Guided media refers to physical cables or wires that confine and direct the transmission of signals. These cables provide a structured pathway for data to travel, ensuring reliability and protection from interference. Here's a breakdown of the options:

    • A. Radio Waves: Radio waves are a form of unguided media, meaning they travel freely through the air or space.
    • B. Optical fiber: This is a type of guided media that uses light pulses to transmit data. It offers high bandwidth and resistance to interference.
    • C. Microwaves: Similar to radio waves, microwaves are unguided media used for short-range wireless communication.
    • D. Twisted pair: This is a common type of guided media consisting of two insulated copper wires twisted together. It's widely used in telephone and Ethernet networks.
    • E. Coaxial cable: Another guided media option, coaxial cable has a single copper conductor surrounded by an insulating layer and a braided metal shield. It provides better protection against interference compared to twisted pair.

    In conclusion, only optical fiber, twisted pair, and coaxial cable are examples of guided media because they act as physical channels for data transmission.

     

  • Question 4
    5 / -1

    Directions For Questions

    Consider the following function for insertion_sort
    def insertion_sort(list3):
    n = len(list3)
    for i in _______ : # [statement-1]
    temp = ________ : # [ statement-2]
    j = i - 1
    while j>= 0 and : # [statement-3]
    list3 [j+1] = list3 [j]
    j = _______ # [statement-4]
    _______ = temp # [statement-5]

    ...view full instructions

    Given the following options for the statements.

    A. temp <list3[j]

    B. list3[i]

    C. list3 [j+1]

    D. range(n)

    E. j-1

    Choose the correct sequence of statement.

    Solution

    The correct answer is D→B→A→E→C

    Key Points

    Insertion sort works by iterating over each element in the list starting from the second element. For each element, it compares it to the previous elements and inserts it into the correct position in the sorted subarray on its left.

    Statement-1: This should be a loop over the indices of the list starting from 1 to n-1. The range function returns a sequence of numbers, so range(n) would be appropriate.

    • Correct option: D
    • The loop should be for i in range(n):

    Statement-2: Before we start comparing the element at the current index i with the elements before it, we need to store its value in a variable. We call this temp.

    • Correct option: B
    • temp = list3[i]

    Statement-3: The while loop condition must ensure that it runs as long as j is non-negative and the current element (pointed by temp) is less than list3[j].

    • Correct option: A
    • while j >= 0 and temp < list3[j]:

    Statement-4: If the condition in the while loop is true, shift list3[j] one position to the right (i.e., to index j+1), and decrement j to continue comparing temp with the next element on the left.

    • Correct option: E
    • j = j - 1

    Statement-5: Finally, insert temp in its correct position in the sorted subarray. This position is j + 1 because j was decremented one extra time in the while loop.

    • Correct option: C
    • list3[j + 1] = temp

    Putting all of these together, the correct sequence of statements is: D→B→A→E→C

     

  • Question 5
    5 / -1

    Directions For Questions

    Which of the following is (are) attribute(s) of file object?

    A. closed

    B. mode

    C. next

    D. name

    E. tell

    ...view full instructions

    Choose the correct answer from the options given below:

    Solution

    The correct answer is A, B and D only

    Key Points

    • A. closed - This is an attribute that indicates whether the file is closed or not. If the file is closed, it returns True; otherwise, it returns False.
    • B. mode - This attribute represents the mode in which the file was opened, such as 'r' for reading, 'w' for writing, etc.
    • C. next - This is not an attribute of a file object; it refers to a built-in function in Python that retrieves the next item from an iterator.
    • D. name - This attribute holds the name of the file.
    • E. tell - This is not an attribute but a method of a file object that tells you the current position within the file.

    Therefore, the attributes of a file object include closed, mode, and name, making the correct choice 4) A, B, and D only.

     

  • Question 6
    5 / -1

    In SQL ______ is an aggregate function.

    Solution

    Concept:

    Aggregate functions return a single result row based on groups of rows, rather than on single rows. Aggregate functions can appear in select lists and in ORDER BY and HAVING clauses.

     

  • Question 7
    5 / -1

    Consider attributes ID, CITY and NAME. Which one of this can be considered as a super key?

    Solution

    The correct option is (2)

    ID

    Concept:-

    Here the ID is the only attribute that can be assumed as a primary key in this scenario. Other attributes are not valid choices.

    Explanation:

    Let me take an example to clarify the above statement.

    Consider that the ID attribute is unique to every employee. In that case, we can say that the ID attribute can uniquely identify the tuples of this table, and it can be treated as a primary key. The primary key is a minimal super key, consequently, ID is also a super key.

    Key Points

    • A group of one or more columns (attributes) used to specifically identify rows in a database is known as a super key.
    • The super key is created by adding 0–more attributes to the candidate key. Super keys are candidate keys, but the opposite is not true.
    • An alternate key serves as an alternate unique identifier for each entity instance in addition to the primary key.
    • To get records from tables, super keys and candidate keys are both used. The associations between tables are also established using these keys.

    Note: If any attribute is combined with candidate or primary key, then the combination becomes super key. Hence the given option 4 (CITY, ID) can also be a valid answer. But as per the official answer, option 2 is correct.

     

  • Question 8
    5 / -1

    Directions For Questions

    A sort algorithm works on the following principle.

    1. Find the smallest item in the list, and exchange it with the left-most unsorted element.

    2. Repeat the process from the first unsorted element.

    ...view full instructions

    Which of the following sorting algorithms does it correspond to?

    Solution

    Answer: Option 3

    Concept:

    Quick sort:

    • Quicksort is an efficient sorting algorithm also known as a partition-exchange sort
    • Quicksort is a comparison sort, meaning that it can sort items of any type for which a "less-than" relation is defined
    • Quicksort is a divide-and-conquer algorithm in which the pivot element is chosen, and this pivot element reduced the given problem into two smaller set
    • In the efficient implementations, it is not a stable sort, meaning that the relative order of equal sort items is not preserved
    • Quicksort can operate in place on an array, requiring small additional amounts of memory to perform the sorting.

    In Quicksort, the worst-case takes Θ (n2) time. The worst case of quicksort is when the first or the last element is chosen as the pivot element.

    This will give Θ (n2) time complexity.
    Recurrence relation for quick sort algorithm will be,
    T (n) = T (n - 1) + Θ (n)
    This will give the worst-case time complexity as Θ (n2).

    Merge sort:

    • Merge sort is an efficient sorting algorithm that uses a divide-and-conquer approach to order elements in an array.
    • Mergesort has two steps:
      • Merging
      • Sorting.
    • The algorithm uses a divide-and-conquer approach to merge and sort a list.

    The recursive mergesort algorithm is

    1. If the list has only one element, Return the list and terminate. (Base case)
    2. Split the list into two halves that are as equal in length as possible. (Divide)
    3. Using recursion, sort both lists using mergesort. (Conquer)
    4. Merge the two sorted lists and return the result. (Combine).

    In Merge sort, the worst-case takes Θ (n log n) time. Merge sort is based on the divide and conquer approach. It is out of place sorting algorithms

    Recurrence relation for merge sort will become:

    T(n) = 2T (n/2) + Θ (n)
    T(n) = n + Θ (n)
    T (n) = n × logn

    Selection sort:

    Algorithm:

    • Find the smallest item in the list, and exchange it with the leftmost unsorted element.
    • Repeat the process from the first unsorted element.

    Insertion sort:

    In Insertion sort, the worst-case takes Θ (n2) time, the worst case of insertion sort is when elements are sorted in reverse order. It is an in-place sorting algorithm.

    In that case, the number of comparisons will be like:

     

  • Question 9
    5 / -1

    Modes of communication are :

    Solution

    The correct answer is All of these

    Key Points

    • Simplex Communication: This is a one-way communication where one party can send data but cannot receive, like a radio or television broadcast.
    • Duplex Communication: This allows for two-way communication, with both parties able to send and receive data simultaneously, like a telephone conversation.
    • Half-Duplex Communication: This is also a two-way communication but not at the same time. When one party sends data, the other can only receive it, and vice versa. Walkie-talkies are a good example of this mode of communication.

     

  • Question 10
    5 / -1

    A repeater is a device which operates only in the:

    Solution

    A repeater is a device that operates only in the physical layer. Signals that carry information within a network can travel a fixed distance before attenuation endangers the integrity of the data.

     

Self Studies
User
Question Analysis
  • Correct -

  • Wrong -

  • Skipped -

My Perfomance
  • Score

    -

    out of -
  • Rank

    -

    out of -
Re-Attempt Weekly Quiz Competition
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now