Self Studies

Computer Science Test - 22

Result Self Studies

Computer Science Test - 22
  • 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

    What is/are instance(s) of database?

    Solution

    Instance or extension or database state which is a collection of information stored in a database at a particular moment is called an instance of the database. Thus, it is a dynamic value which keeps on changing.

  • Question 2
    5 / -1

    Match List I and List II.

    Solution

    (A) World Wide Web (WWW) - It is a system of interlinked hypertext documents that are accessed via the Internet. Documents and downloadable media are made available to the network through web servers and can be accessed by programs such as web browsers.

    (B) Internet - The Internet, sometimes called simply "the Net," is a worldwide system of computer networks. It is a network of networks in which users at any one computer can, if they have permission, get information from any other computer. Hence, it is a global network of interconnected computers and other devices that use standardized communication protocols.

    (C) Cloud Computing - It is a model for delivering on-demand access to shared computing resources over the Internet. It is the delivery of computing services—including servers, storage, databases, networking, software, analytics, and intelligence—over the internet to offer faster innovation and flexible resources.

    (D) Machine-to-Machine (M2M) - It is technology that enables direct communication between IoT devices, without the need for human intervention. The main purpose of M2M technology is to tap into sensor data and transmit it to a network.

  • Question 3
    5 / -1

    Match the contents under List I with those under List II.

    Solution
    • Linear Search has a worst-case time complexity of O(n), where n is the size of the input data.
    • Binary Search has a worst-case time complexity of O(log n), where n is the size of the input data.
    • Interpolation Search has a worst-case time complexity of O(n log n), which is less efficient than O(log n) algorithms like Binary Search.
    • The worst-case running time of Depth-First Search (DFS) depends on the graph being traversed. In a graph with n nodes and m edges, the time complexity of DFS is O(n+m), which means that the running time increases linearly with the number of nodes and edges in the graph.
  • Question 4
    5 / -1

    What is the output of following code:

    T = (100)

    print(T*2)

    Solution

    We can use * operator to repeat the tuple values n number of times.

    For example:

    ("abc",)*3 will return ('abc', 'abc', 'abc').

  • Question 5
    5 / -1

    Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File.

    CSV File

    1, AKSHAY,XII,A
    2, ABHISHEK,XII,A
    3, ARVIND,XII,A
    4, RAVI,XII,A
    5, ASHISH,XII,A

    Incomplete Code
    import_____ #Statement-1
    fh = open(_____, _____, newline='') #Statement-2
    stuwriter = csv._____ #Statement-3
    data = []
    header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION']
    data.append(header)
    for i in range(5):
    roll_no = int(input("Enter Roll Number : "))
    name = input("Enter Name : ")
    Class = input("Enter Class : ")
    section = input("Enter Section : ") rec = [_____] #Statement-4
    data.append(rec)
    stuwriter. _____ (data)
    #Statement-5

    fh.close()

    Identify the suitable code for blank space in line marked as Statement-1.

    Solution

    csv is the correct code to fill up the blank in Statement 1, which is to be imported.

  • Question 6
    5 / -1

    Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File.

    CSV File

    1, AKSHAY,XII,A
    2, ABHISHEK,XII,A
    3, ARVIND,XII,A
    4, RAVI,XII,A
    5, ASHISH,XII,A

    Incomplete Code

    import_____ #Statement-1
    fh = open(_____, _____, newline='') #Statement-2
    stuwriter = csv._____ #Statement-3
    data = []
    header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION']
    data.append(header)
    for i in range(5):
    roll_no = int(input("Enter Roll Number : "))
    name = input("Enter Name : ")
    Class = input("Enter Class : ")
    section = input("Enter Section : ") rec = [_____] #Statement-4
    data.append(rec)
    stuwriter. _____ (data)
    #Statement-5

    fh.close()

    Choose the function name (with argument) that should be used in the blank space of line marked as Statement-3

    Solution

    writer(fh) should be used in blank space in Statement 3. csv. writer is used to insert data to the CSV file.

  • Question 7
    5 / -1

    Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File.

    CSV File

    1, AKSHAY,XII,A
    2, ABHISHEK,XII,A
    3, ARVIND,XII,A
    4, RAVI,XII,A
    5, ASHISH,XII,A

    Incomplete Code

    import_____ #Statement-1
    fh = open(_____, _____, newline='') #Statement-2
    stuwriter = csv._____ #Statement-3
    data = []
    header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION']
    data.append(header)
    for i in range(5):
    roll_no = int(input("Enter Roll Number : "))
    name = input("Enter Name : ")
    Class = input("Enter Class : ")
    section = input("Enter Section : ") rec = [_____] #Statement-4
    data.append(rec)
    stuwriter. _____ (data)
    #Statement-5

    fh.close()

    Choose the function name that should be used in the blank space of line marked as Statement-5 to create the desired CSV File?

    Solution

    writerows() should be used in blank space in Statement 5.

    writerows() function writes each sequence in a list as a comma separated line of items in the file.

  • Question 8
    5 / -1

    Rohit, a student of class 12th, is learning CSV File Module in Python. During examination, he has been assigned an incomplete python code (shown below) to create a CSV File 'Student.csv' (content shown below). Help him in completing the code which creates the desired CSV File.

    CSV File

    1, AKSHAY,XII,A
    2, ABHISHEK,XII,A
    3, ARVIND,XII,A
    4, RAVI,XII,A
    5, ASHISH,XII,A

    Incomplete Code

    import_____ #Statement-1
    fh = open(_____, _____, newline='') #Statement-2
    stuwriter = csv._____ #Statement-3
    data = []
    header = ['ROLL_NO', 'NAME', 'CLASS', 'SECTION']
    data.append(header)
    for i in range(5):
    roll_no = int(input("Enter Roll Number : "))
    name = input("Enter Name : ")
    Class = input("Enter Class : ")
    section = input("Enter Section : ") rec = [_____] #Statement-4
    data.append(rec)
    stuwriter. _____ (data)
    #Statement-5

    fh.close()

    Identify the missing code for blank space in line marked as Statement-2

    Solution

    This code opens a file student.csv in write mode becasue append( ) method is using.

    So, correct misssing code is "Student.csv", "w"

  • Question 9
    5 / -1

    Consider the following relation.

    Table: Customers(C_id, C_name, C_age, C_Country)

    What is the output for the given SQL Query?

    Query:

    ALTER TABLE Customers

    ADD income INT;

    What is the degree of the customer relationship?

    Solution

    The correct answer is option B.

    Concept:

    Add an attribute to an existing table:
    Sometimes, we may need to add an additional attribute to a table. It can be done using the syntax given below:

    Syntax:

    ALTER TABLE table_name ADD attribute_name DATATYPE;

    DEGREE:

    The number of attributes in a relation is called the Degree of the relation.

    Explanation:

    The customer relation adds a new attribute to the customer relationship. Now the Customers relation becomes the Customers(C_id, C_name, C_age, C_Country, income)

    Query:

    ALTER TABLE Customers

    ADD income INT;

    Hence the degree of the relation becomes 5.

    Hence the correct answer is 5.

  • Question 10
    5 / -1

    What is ISP in computer networks?

    Solution

    The correct answer is option A.

    Concept:

    ISP:

    An ISP (internet service provider) is a company that provides individuals and organizations access to the internet and other related services.

    • An ISP is also sometimes referred to as an internet access provider.
    • An ISP has the equipment and the telecommunication line access required to have a point of presence on the internet for the geographic area served.
    • ISPs may also provide different internet connection types, such as cable and fiber.
    • Customers may access the internet through ISPs, who also offer other services like email, domain registration, and web hosting.

    Hence the correct answer is an Internet service provider.

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