Category: Python for Class 12

  • Informatics Practices Class 12 Question Bank Chapter wise

    Informatics Practices Class 12 Question Bank Chapter wise   INTRODUCTION TO PYTHON   1. Which of the following is an assignment operator in Python? a) == b) === c) >>> d) =   2. What will be the output after the following statements? x,y=6,3 print (x / y) a) 2.0 b)  2 c) 18 d)…

  • Python Practice Paper for Class 12

    I. MULTIPLE CHOICE QUESTIONS 10X1=10 1. To open a file c:\ss.txt for appending data we use a. file = open(‘c:\\ss.txt’,’a’) b. file = open(r‘c:\ss.txt’,’a’) c. file = open(‘c:\\ss.txt’,’w’) d. both a and b 2. To read the next line of the file from the file object infi, we use a. infi.read(all) b. infi.read() c. infi.readline()…

  • Python Libraries MCQ Class 12

      1. To include the use of functions which are present in the random library, we must use theoption: a)importrandom b)random.h c)import.random d)random.random   2. The output of the following Python code is either 1 or 2. import random random.randint(1,2) a)True b)False   3. What will be the output of the following Python code? import…

  • Python Revision Tour Worksheet Class 12

    Multiple Choice Questions:  (20 x 1=20) 1. What will be the output of the following Python code? from math import factorial print (math.factorial (5)) (a) 120 (b) Nothing is printed (c) Error, method factorial doesn’t exist in math module (d) Error, the statement should be: print(factorial(5)) 2. What is the order of namespaces in which…

  • Class 12 Computer Science Worksheets

    Worksheet-1 1. What is a string slice? How is it useful? (2) 2. Distinguish between concatenation and Replication in string .Give an example.(3) 3. What are the Characteristics of a dictionary? (2) 4. The numbered position of a letter in a string is called —————– (1) 5. Difference between Bubble sort and Insertion sort.Give an…