New ! Computer Science MCQ Practise Tests



Python and CSV Files 1 Mark Book Back Question Paper With Answer Key

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 00:10:00 Hrs
Total Marks : 10

    Multiple Choice Question 

    10 x 1 = 10
  1. A CSV file is also known as a ….

    (a)

    Flat File

    (b)

    3D File

    (c)

    String File

    (d)

    Random File

  2. The expansion of CRLF is

    (a)

    Control Return and Line Feed

    (b)

    Carriage Return and Form Feed

    (c)

    Control Router and Line Feed

    (d)

    Carriage Return and Line Feed

  3. Which of the following module is provided by Python to do several operations on the CSV files?

    (a)

    py

    (b)

    xls

    (c)

    csv

    (d)

    os

  4. Which of the following mode is used when dealing with non-text files like image or exe files?

    (a)

    Text mode

    (b)

    Binary mode

    (c)

    xls mode

    (d)

    csv mode

  5. The command used to skip a row in a CSV file is

    (a)

    next()

    (b)

    skip()

    (c)

    omit()

    (d)

    bounce()

  6. Which of the following is a string used to terminate lines produced by writer()method of csv module?

    (a)

    Line Terminator

    (b)

    Enter key

    (c)

    Form feed

    (d)

    Data Terminator

  7. What is the output of the following program? import csv
    d=csv.reader(open('c:\PYPRG\ch13\city.csv'))
    next(d)
    for row in d:
    print(row)
    if the file called “city.csv” contain the following details
    chennai,mylapore
    mumbai,andheri

    (a)

    chennai,mylapore

    (b)

    mumbai,andheri

    (c)

    chennai,mumba

    (d)

    chennai,mylapore,mumbai,andheri

  8. Which of the following creates an object which maps data to a dictionary?

    (a)

    listreader()

    (b)

    reader()

    (c)

    tuplereader()

    (d)

    DictReader ()

  9. Making some changes in the data of the existing file or adding more data is called

    (a)

    Editing

    (b)

    Appending

    (c)

    Modification

    (d)

    Alteration

  10. What will be written inside the file test.csv using the following program
    import csv
    D = [['Exam'],['Quarterly'],['Halfyearly']]
    csv.register_dialect('M',lineterminator = '\n')
    with open('c:\pyprg\ch13\line2.csv', 'w') as f:
    wr = csv.writer(f,dialect='M')
    wr.writerows(D)
    f.close()

    (a)

    Exam Quarterly Halfyearly

    (b)

    Exam Quarterly Halfyearly

    (c)

    E, Q, H

    (d)

    Exam, Quarterly, Halfyearly

*****************************************

Reviews & Comments about 12th Standard Computer Science English Medium - Python and CSV Files 1 Mark Book Back Question Paper and Answer Key 2022 - 2023

Write your Comment