Self Studies

Computer Scienc...

TIME LEFT -
  • 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?

  • Question 2
    5 / -1

    What is the significance of the tell() method?

  • Question 3
    5 / -1

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

  • Question 4
    5 / -1

    What are the two advantages of database management system?

  • Question 5
    5 / -1

    Which method is used to protect online images from hackers?

  • Question 6
    5 / -1

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

  • Question 7
    5 / -1

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

    Which of the following represents the data type of L?

  • Question 8
    5 / -1

    Which of the following file modes is not valid?

  • 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).

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

Submit Test
Self Studies
User
Question Analysis
  • Answered - 0

  • Unanswered - 10

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Submit Test
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