New ! Computer Science MCQ Practise Tests



12th Standard Computer Science English Medium Strings and String Manipulations Reduced Syllabus Important Questions With Answer Key 2021

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 100

      Multiple Choice Questions


    15 x 1 = 15
  1. What will be the output of the following code?
    str1 = "Chennai Schools"
    str1[7] = "-"

    (a)

    Chennai-Schools

    (b)

    Chenna-School

    (c)

    Type error

    (d)

    Chennai

  2. Strings in python:

    (a)

    Changeable

    (b)

    Mutable

    (c)

    Immutable

    (d)

    flexible

  3. What is stride?

    (a)

    index value of slide operation

    (b)

    first argument of slice operation

    (c)

    second argument of slice operation

    (d)

    third argument of slice operation

  4. The subscript of a string may be:

    (a)

    Positive

    (b)

    Negative

    (c)

    Both (a) and (b)

    (d)

    Either (a) or (b)

  5. Which of the following allows creation of multiline strings

    (a)

    ' '

    (b)

    " "

    (c)

    '''''' ''''''

    (d)

    none of these

    (e)

    None of these

  6. String index values are also called as

    (a)

    class

    (b)

    function

    (c)

    subscript

    (d)

    arguments

  7. _____ is a combination of letters, numbers or special symbols enclosed with. If, " "or '" '"

    (a)

    String

    (b)

    Function

    (c)

    Parameters

    (d)

    Scope fo aviable

  8. In python _____ are immutable.

    (a)

    Characters

    (b)

    Strings

    (c)

    Numbers

    (d)

    Functions

  9. The _____ operator is used to display a string in multiple number of time.

    (a)

    *

    (b)

    * *

    (c)

    * =

    (d)

    + +

  10. What is the output from the following statement?
    str1 = "welcome"
    print (str1[:: 3]

    (a)

    come

    (b)

    orne

    (c)

    wce

    (d)

    wel

  11. What is Escape sequence character for the description character with octal value?

    (a)

    \OHH

    (b)

    \OOO

    (c)

    /OOO

    (d)

    /OHH

  12. Which of the following is used as a place holders which get replaced along with format function?

    (a)

    []

    (b)

    ()

    (c)

    {}

    (d)

    <>

  13. Which of the following function used to capitalize the first character of the string?

    (a)

    captial ()

    (b)

    firstcapital ()

    (c)

    capitalize ()

    (d)

    capitalizefirst ()

  14. The function used to search the first occurrence of the substring In the given string is

    (a)

    search ()

    (b)

    find ()

    (c)

    find string ()

    (d)

    searchstring ()

  15. What is the output for the following?
    'mammals'. find ('ma')

    (a)

    0

    (b)

    1

    (c)

    -1

    (d)

    3

    1. 2 Marks


    10 x 2 = 20
  16. What is String?

  17. How will you delete a string in Python?

  18. What is slicing?

  19. How will you manipulate the strings?

  20. Write the output for the following if strl = "THIRIKKURAL"
    (i) print (strl [0])
    (ii) print (strl [0:5])
    (ill) print (strl [:5])
    (iv) Print (strl [6:])

  21. Write a program to print the following output
    C
    CO
    COM
    COM
    COMP
    COMPU
    COM PUT
    COMPUTE
    COMPUTER

  22. if strl = "Welcome to learn python", then write the output for the following.
    (i) print (strl [10 : 16])
    (ii) print (strl [10 : 16: 4])
    (iii) print (strl [10: 16: 2])
    (iv) print (strl [: : 3])

  23. Write a note on the function center ().

  24. Write the output for the following statement.
    (i) print ("save earth".title ())
    (ii) print ("Save Earth".swapcase ())

  25. What is the use of title () function? Give example.

    1. 3 Marks


    15 x 3 = 45
  26. Write a Python program to display the given pattern
    C O M P U T E R
    C O M P U T E
    C O M P U T
    C O M P U
    C O M P
    C O M
    C O
    C

  27. Write a short about the followings with suitable example:
    (a) capitalize( )
    (b) swapcase( )

  28. What is the use of format( )? Give an example.

  29. Write a note about count( ) function in python.

  30. How the positive and negative subscript values are assigned? Give example.

  31. Write a program to accept a string and print it in reverse order.

  32. Write the syntax and example of using string characters.

  33. Write the usage of the following format string characters.
    (i) % c
    (ii) % d (or) % i
    (iii) % s

  34. Write the description for the following escape sequence.
    (i) \r
    (ii) \000
    (iii) \v

  35. Write the output of the following statements.
    (i) print (len ("Corporation"))
    (ii) print ("school", Capitalize ())
    (iii) print ("Welcome" center (15, '*'))

  36. Write the output of the following statements.
    strl = 'mammals'
    (i) std. find ('ma')
    (ii) std. find ('ma', 2)
    (iii) std. find ('ma', 2, 4)
    (iv) std. find ('ma', 2, 5)

  37. Write the output of the following statements.
    (i) 'Python 2.3' . isalpha ()
    (ii) 'Python Program' . is alnum ()
    (iii) 'Python' . isupper ()

  38. Write the output for the following statement.
    (i) print ("PYTHON" . lower ())
    (ii) print ("PYTHON" . islower ())
    (iii) print ("PYTHON" . isupper ())
    (iv) print ("PYTHON" . upper ())

  39. Write a note on
    (i) isalnum ()
    (ii) isalpha ()
    (iii) isdigit ()

  40. With an example program explain about membership operators?

    1. 5 Marks


    4 x 5 = 20
  41. Explain about string operators in python with suitable example.

  42. Write a python program to check whether the given string is palindrome or not.

  43. Write a python program to print the following pattern
    *
    **
    ***
    ****
    *****

  44. Write a python program to display the number of vowels and consonants in the given string.

*****************************************

Reviews & Comments about 12th Standard Computer Science English Medium Strings and String Manipulations Reduced Syllabus Important Questions With Answer Key 2021

Write your Comment