New ! Computer Science MCQ Practise Tests



12th Standard English Medium Computer Science Subject Python and CSV Files Book Back 1 Mark Questions with Solution Part - II

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 5

    1 Marks

    5 x 1 = 5
  1. 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

  2. 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

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

    (a)

    listreader()

    (b)

    reader()

    (c)

    tuplereader()

    (d)

    DictReader ()

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

    (a)

    Editing

    (b)

    Appending

    (c)

    Modification

    (d)

    Alteration

  5. 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 English Medium Computer Science Subject Python and CSV Files Book Back 1 Mark Questions with Solution Part - II updated Book back Questions

Write your Comment