Page 165 - TP_Plus_v2.2_Class_8
P. 165
test Your skiLLs
1. Tick ( ) the correct option.
a. Which operator is used for string concatenation in Python?
(i) * (ii) +
(iii) - (iv) /
b. What is the input given to the functions referred to as?
(i) Return Value (ii) Name
(iii) Arguments (iv) None of these
c. What does the len() function return when used on the string "Python"?
(i) 6 (ii) 5
(iii) 7 (iv) 8
d. Which of the following is used to insert special characters that are invalid in Python?
(i) Escape sequence (ii) Strings
(iii) Lists (iv) None of these
e. Which operator is used to repeat the string for a given number of times?
(i) String Concatenation Operator (ii) String Replication Operator
(iii) len() (iv) None of these
2. Fill in the blanks using the words given below:
function, capitalize, string, lower
a. The ____________ function returns a string with the first character in capital.
b. ____________ can be defined as a block of a reusable code that performs a specific task.
c. The ____________ function converts all uppercase letters to lowercase.
d. A consecutive sequence of characters which are enclosed or surrounded by single or double
quotes is known as a ____________ .
3. Short answer type questions.
a. What are functions?
______________________________________________________________________________
b. What is the use of string concatenation operator?
______________________________________________________________________________
c. Write any two features of functions.
______________________________________________________________________________
Functions and String in Python 163

