Humanities/Arts Exam  >  Humanities/Arts Questions  >  Rohit, a student of class 12th, is learning C... Start Learning for Free
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()
Q. Identify the missing code for blank space in line marked as Statement-2?
  • a)
    "School.csv","w"
  • b)
    "Student.csv","w"
  • c)
    "Student.csv","r"
  • d)
    "School.csv","r"
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
Rohit, a student of class 12th, is learning CSV File Module in Python....
This code opens a file student.csv in write mode becasue append( ) method is using.
So, correct misssing code is "Student.csv", "w"
Explore Courses for Humanities/Arts exam

Top Courses for Humanities/Arts

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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer?
Question Description
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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer? for Humanities/Arts 2024 is part of Humanities/Arts preparation. The Question and answers have been prepared according to the Humanities/Arts exam syllabus. Information about 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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Humanities/Arts 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for 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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer?.
Solutions for 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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Humanities/Arts. Download more important topics, notes, lectures and mock test series for Humanities/Arts Exam by signing up for free.
Here you can find the meaning of 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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of 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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer?, a detailed solution for 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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of 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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice 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 File1, AKSHAY,XII,A2, ABHISHEK,XII,A3, ARVIND,XII,A4, RAVI,XII,A5, ASHISH,XII,AIncomplete Codeimport_____ #Statement-1fh = open(_____, _____, newline=) #Statement-2stuwriter = csv._____ #Statement-3data = []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-4data.append(rec)stuwriter. _____ (data)#Statement-5fh.close()Q.Identify the missing code for blank space in line marked as Statement-2?a)"School.csv","w"b)"Student.csv","w"c)"Student.csv","r"d)"School.csv","r"Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Humanities/Arts tests.
Explore Courses for Humanities/Arts exam

Top Courses for Humanities/Arts

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev