Self Studies

Computer Science Test - 18

Result Self Studies

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

    Insertions take place at the rear end of the queue and deletions take place at the 'front' end of the queues. On which principal does this work?

    Solution

    In linear queue, an insertion takes place from one end while the deletion occurs from another end. The end at which the insertion takes place is known as the rear end, and the end at which the deletion takes place is known as the front end.

  • Question 2
    5 / -1

    What is the significance of the tell() method?

    Solution

    The tell() method returns the current position of file object. This method takes no parameters and returns an integer value. Initially file pointer points to the beginning of the file (if not opened in append mode). So, the initial value of tell() is zero.

  • Question 3
    5 / -1

    Computers manipulate data in many ways, this manipulation is called _____.

    Solution

    Processing is any computer program that is not a control program, such as an application program, or a non-controlling part of the operating system, such as a sort-merge program or language translator.

  • Question 4
    5 / -1

    What are the two advantages of database management system?

    Solution

    Data base security and integrity are two advantages of the data base management system. Central control also ensures that adapted checks are incorporated.

  • Question 5
    5 / -1

    Which method is used to protect online images from hackers?

    Solution

    A firewall is an essential piece of security software that monitors all incoming and outgoing traffic going through your network, checking for hackers, malware, unauthorized outgoing information, or anything that might put you or your PC at risk. Firewalls are often the first line of defense when protecting your data.

  • Question 6
    5 / -1

    _________ switching is well suited for voice communication while _________switching is better suited for data and other non-voice communication.

    Solution

    In-circuit switching when the source does not have enough data to transmit, the resources are unnecessarily kept idle. To avoid such situation, Message switching is used.
    Circuit Switching is a switching technique method that establishes a dedicated path between the sender and the receiver to send the data. The example of a Circuit-switch network is a telephone network.

  • Question 7
    5 / -1

    Consider a declaration, L = (1, 'Python', '3.14').

    Which of the following represents the data type of L?

    Solution

    A tuple is almost like a List and contains python objects and objects inside are separated by comma (,) and enclosed within parentheses.

    Example:

    list1 = (6.25, 'brinjal', 'onion', 'beans')
    list1 is a tuple.

  • Question 8
    5 / -1

    Which of the following file modes is not valid?

    Solution

    File mode r+, w+, or a+ may be to perform both read and write operations using a single file object.

  • Question 9
    5 / -1

    Directions For Questions

    Radha Shah is a programmer, who has recently been given a task to write a python code to perform the following CSV file operations with the help of two user defined functions/modules:

    a. CSVOpen() : to create a CSV file called BOOKS.CSV in append mode containing information of books – Title, Author, and Price.
    b. CSVRead() : to display the records from the CSV file called BOOKS.CSV where the field title starts with 'R'.

    She has succeeded in writing partial code and has missed out certain statements, so she has left certain queries in comment lines.
    import csv
    def CSVOpen():
    with open('books.csv','______',newline='') as csvf:
    #Statement-1
    cw=______ #Statement-2
    ______ #Statement-3
    cw.writerow(['Rapunzel','Jack',300])
    cw.writerow(['Barbie','Doll',900])
    cw.writerow(['Johnny','Jane',280])
    def CSVRead():

    ...view full instructions

    Choose the appropriate mode in which the file is to be opened in append mode (Statement 1).

    Solution

    Mode 'a' opens a file for appending. The file pointer is placed at the end of the file, if the file exists. If the file does not exist, it creates a new file for writing.

  • Question 10
    5 / -1

    Directions For Questions

    Radha Shah is a programmer, who has recently been given a task to write a python code to perform the following CSV file operations with the help of two user defined functions/modules:

    a. CSVOpen() : to create a CSV file called BOOKS.CSV in append mode containing information of books – Title, Author, and Price.
    b. CSVRead() : to display the records from the CSV file called BOOKS.CSV where the field title starts with 'R'.

    She has succeeded in writing partial code and has missed out certain statements, so she has left certain queries in comment lines.
    import csv
    def CSVOpen():
    with open('books.csv','______',newline='') as csvf:
    #Statement-1
    cw=______ #Statement-2
    ______ #Statement-3
    cw.writerow(['Rapunzel','Jack',300])
    cw.writerow(['Barbie','Doll',900])
    cw.writerow(['Johnny','Jane',280])
    def CSVRead():

    ...view full instructions

    Choose the correct option for Statement 3 to write the names of the column headings in the CSV file, BOOKS.CSV.

    Solution

    Correct code for statement 3 is cw.writerow (['Title', 'Author', 'Price']) where, Title, Author and Price are the columns. writerow () method is used to write single row at a time.

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