Strings and String Manipulations Book Back Questions

12th Standard EM

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 00:45:00 Hrs
Total Marks : 30
    5 x 1 = 5
  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. 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

  3. Which of the following formatting character is used to print exponential notation in upper case?

    (a)

    %e

    (b)

    %E

    (c)

    %g

    (d)

    %n

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

    (a)

    { }

    (b)

    < >

    (c)

    ++

    (d)

    ^^

  5. The subscript of a string may be:

    (a)

    Positive

    (b)

    Negative

    (c)

    Both (a) and (b)

    (d)

    Either (a) or (b)

  6. 4 x 2 = 8
  7. What is String?

  8. How will you delete a string in Python?

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

  10. What is slicing?

  11. 4 x 3 = 12
  12. 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

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

  14. What will be the output of the given python program?
    str1 = "welcome"
    str2 = "to school"
    str3=str1[:2]+str2[len(str2)-2:]
    print(str3)

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

  16. 1 x 5 = 5
  17. Explain about string operators in python with suitable example.

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

TN 12th Standard EM Computer Science free Online practice tests

Reviews & Comments about 12th Computer Science - Strings and String Manipulations Book Back Questions

Write your Comment