New ! Computer Science MCQ Practise Tests



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

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

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

      Multiple Choice Questions


    15 x 1 = 15
  1. Which of the following is the output of the following python code?
    str1="TamilNadu"
    print(str1[::-1])

    (a)

    Tamilnadu

    (b)

    Tmlau

    (c)

    udanlimaT

    (d)

    udaNlimaT

  2. Defining strings within triple quotes allows creating:

    (a)

    Single line Strings

    (b)

    Multiline Strings

    (c)

    Double line Strings

    (d)

    Multiple Strings

  3. Which of the following is used as placeholders or replacement fields which get replaced along with format( ) function?

    (a)

    { }

    (b)

    < >

    (c)

    ++

    (d)

    ^^

  4. Which of the following allows creation of multiline strings

    (a)

    ' '

    (b)

    " "

    (c)

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

    (d)

    none of these

    (e)

    None of these

  5. Which of the following is used to access and manipulate the strings

    (a)

    Index value

    (b)

    Subscript

    (c)

    Argument

    (d)

    Parameters

    (e)

    a or b

  6. The negative subscript is always begins with

    (a)

    0

    (b)

    1

    (c)

    -1

    (d)

    -1.0

  7. In Python, the entire string variable removed using _____ command

    (a)

    Remove

    (b)

    Replace

    (c)

    Del

    (d)

    Delete

  8. The 'in' and 'not in ' operators are called as _____ operators.

    (a)

    string

    (b)

    string formatting

    (c)

    membership

    (d)

    reference

  9. What is the output from the following statement?
    str1= "python"
    print (str1[: : - 2])

    (a)

    nhy

    (b)

    Pyt

    (c)

    hy

    (d)

    on

  10. Which of the following operator is used to construct strings?

    (a)

    %

    (b)

    ::

    (c)

    #

  11. Which of the following formatting operator is used to represent signed decimal integer?

    (a)

    %d or %i

    (b)

    %s or %c

    (c)

    %g or %x

    (d)

    %s or %e

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

    (a)

    captial ()

    (b)

    firstcapital ()

    (c)

    capitalize ()

    (d)

    capitalizefirst ()

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

    (a)

    0

    (b)

    1

    (c)

    -1

    (d)

    3

  14. What is the output for the following?
    'mammals'. find ('ma', 2, 5)

    (a)

    0

    (b)

    3

    (c)

    -1

    (d)

    1

  15. The default value of stride is

    (a)

    0

    (b)

    -1

    (c)

    1

    (d)

    -0

    1. 2 Marks


    10 x 2 = 20
  16. What is String?

  17. How will you delete a string in Python?

  18. What will be the output of the following python code?
    str1 = “School”
    print(str1*3)

  19. What is slicing?

  20. How will you manipulate the strings?

  21. 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:])

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

  23. 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])

  24. Write the output for the following statement
    strl = "Welcome to learn python"
    print (strl [: : - 2])

  25. Differentiate lower () and is lower ().

    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. What will be the output of the given python program?
    str1 = "welcome"
    str2 = "to school"
    str3 = str1[:2] + str2[len(str2)-2:]
    print (str3)

  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 formats string characters for the following
    (i) Exponential notation
    (ii) Floating point numbers
    (iii) Short numbers in exponential notation

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

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

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

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

  39. Write the out put for the following statement.
    strl = "Raja Raja Chozhan"
    (i) print (strl. count ('Raja'))
    (ii) print (strl. count ('R'))
    (iii) print (strl. count ('A'))
    (iv) print (strl. count ('a'))
    (v) print (strl. count ('a', 0, 5))
    (vi) print (strl. count ('a', 11))

  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 2021

Write your Comment