Computer Science - Online Test

Q1.

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()

Answer : Option D
Explaination / Solution:
No Explaination.


Q2. What does __name__ contains ?
Answer : Option D
Explaination / Solution:
No Explaination.


Q3. Which of the following clause avoide the duplicate?
Answer : Option A
Explaination / Solution:
No Explaination.


Q4.

Read the statements given below. Identify the right option from the following for pie chart.

Statement A: To make a pie chart with Matplotlib, we can use the plt.pie() function.

Statement B: The autopct parameter allows us to display the percentage value using the Python string formatting.

Answer : Option C
Explaination / Solution:
No Explaination.


Q5. The functions which cause side effects to the arguments passed are called
Answer : Option A
Explaination / Solution:
No Explaination.


Q6. Which of the following is constructed by placing expressions within square brackets?
Answer : Option B
Explaination / Solution:
No Explaination.


Q7. The members that are accessible from within the class and are also available to its sub- classes is called
Answer : Option B
Explaination / Solution:
No Explaination.


Q8. In dynamic programming, the technique of storing the previously calculated values is called ?
Answer : Option C
Explaination / Solution:
No Explaination.


Q9. Which operator is also called as Conditional operator?
Answer : Option A
Explaination / Solution:
No Explaination.


Q10.

Which punctuation should be used in the blank?

if <condition>_

statements-block 1

else:

statements-block 2

Answer : Option B
Explaination / Solution:
No Explaination.