๐Ÿงช Python MCQ Quiz Hub

Python MCQS - Function

Choose a topic to test your knowledge and improve your Python skills

ord() function in Python return the





โœ… Correct Answer: 2

How many argument we require to pass in ord() function in python





โœ… Correct Answer: 1

What we pass in ord() function ?





โœ… Correct Answer: 1

type() function in python is





โœ… Correct Answer: 2

To find the data type of any variable what we use ?





โœ… Correct Answer: 2

Which of the following function are used to find the data type of the numpy array





โœ… Correct Answer: 3

Which of the following are used in function





โœ… Correct Answer: 1

Which of the following is not a predefined function in python





โœ… Correct Answer: 4

Name the inbuld function of the python





โœ… Correct Answer: 4

Which keyword we use to define a function ?





โœ… Correct Answer: 4

list() function return the





โœ… Correct Answer: 3

sin() function is used to find the sine value, which function is used to find the inverse of sine ?





โœ… Correct Answer: 2

Which of the following is correct way to define a function in python?





โœ… Correct Answer: 4

what is the output of the following function print(type(3))





โœ… Correct Answer: 1

What is the output of the following code ? print(type(char))





โœ… Correct Answer: 2

Which of the following is returned by the join function ?





โœ… Correct Answer: 1

Which of the following data type we pass in join() function ?





โœ… Correct Answer: 4

Which of the following function are valid on list ?





โœ… Correct Answer: 4

Which of the following is not the function of list ?





โœ… Correct Answer: 2

What the append() function returns ?





โœ… Correct Answer: 1

what is the output of the following program l=[1,2,3,4] join(l)





โœ… Correct Answer: 3

In which data type, append() function is applicable ?





โœ… Correct Answer: 3

It is possible to create list inside another list ?





โœ… Correct Answer: 1

What we pass as a argument in append() function ?





โœ… Correct Answer: 1

How we get the ASCII value of any character in python programming language ?





โœ… Correct Answer: 3

Function that are defined without the use of def keyword are





โœ… Correct Answer: 3

In lambda function,passing argument and return statement are separated by





โœ… Correct Answer: 1

If function is defined inside the class then it is called





โœ… Correct Answer: 4

What is the use of the append() function in python list ?





โœ… Correct Answer: 2

Append() function in python is used for





โœ… Correct Answer: 1

What is the use of the index() function in Python List ?





โœ… Correct Answer: 2

What is the use of the count() function in python list ?





โœ… Correct Answer: 2

Return type of index() function in python list ?





โœ… Correct Answer: 2

What we pass in index() function ?





โœ… Correct Answer: 4

Number of argument pass in index() function ?





โœ… Correct Answer: 1

How many argument we pass in append() function ?





โœ… Correct Answer: 1

How many argument we pass in pop() lust function ?





โœ… Correct Answer: 1

Which of the following function is insert item in list according to index value ?





โœ… Correct Answer: 3

Which of the list function not take care of index value to perform the task ?





โœ… Correct Answer: 4

Which of the following are valid keyword or function for sort the given data ?





โœ… Correct Answer: 3

Which of the following is valid for reverse the sequence ?





โœ… Correct Answer: 3

set(list) remove the





โœ… Correct Answer: 4

numpy.array() is a function which convert





โœ… Correct Answer: 1

How we convert the list into the numpy array ?





โœ… Correct Answer: 3

pop() function is valid on





โœ… Correct Answer: 3

remove() function is valid on





โœ… Correct Answer: 3

Which of the following function is use for the file Handling ?





โœ… Correct Answer: 4

Which of the following is used to read the text file ?





โœ… Correct Answer: 4

What is the use of tell() function in File handling in python ?





โœ… Correct Answer: 2

Which of the following function is used to find the number of character in text file ?





โœ… Correct Answer: 3

File pointer read the text file char by char, to find the current position of the pointer which function we used ?





โœ… Correct Answer: 1

Which of the function is used to pause the current execution ?





โœ… Correct Answer: 3

Number of argument to pass in sleep() function ?





โœ… Correct Answer: 1

eval() is used to find the value of the





โœ… Correct Answer: 2

What is the work of the split() function ?





โœ… Correct Answer: 2

What we pass in split() function ?





โœ… Correct Answer: 1

Return type of split() function ?





โœ… Correct Answer: 4

By default split() function break the string according to the





โœ… Correct Answer: 4

Which of the function are used to get the value from the user side ?





โœ… Correct Answer: 4

What is the use of the input() function in python ?





โœ… Correct Answer: 3

Return type of the input() function is always





โœ… Correct Answer: 1

To convert numeric string into integer which function we use ?





โœ… Correct Answer: 2

Which of the following function is used to convert the integer to string





โœ… Correct Answer: 1

product() function is defined in which of the following ?





โœ… Correct Answer: 2

To add all item of the list, which function we use ?





โœ… Correct Answer: 2

Number of argument we pass in sum() function ?





โœ… Correct Answer: 4

To find the power of the two number we have only pow(x,y) function ?





โœ… Correct Answer: 2

To find the value of the inverse of tanx in python ?





โœ… Correct Answer: 2

Which of the following is valid to find the inverse of cosine ?





โœ… Correct Answer: 2

acos() function is use for finding the value of





โœ… Correct Answer: 1

What is the use of the filter() function ?





โœ… Correct Answer: 3

Filter() function is valid on





โœ… Correct Answer: 3

What is the use of the map() function ?





โœ… Correct Answer: 3

To copy the sign of one number to another which function we use ?





โœ… Correct Answer: 1

How many argument we pass in map() function ?





โœ… Correct Answer: 2

Which is essential argument to pass in map() function ?





โœ… Correct Answer: 3

Which type of function we call as a argument in map() function ?





โœ… Correct Answer: 4

After applying the filter() function on the list, the number of item in the list





โœ… Correct Answer: 4

Is it possible to pass a lambda function in filter() function ?





โœ… Correct Answer: 1

To change the lower case alphabet to upper case alphabet , what we use ?





โœ… Correct Answer: 2

To change the upper case alphabet to lower case alphabet , what we use ?





โœ… Correct Answer: 1

What we pass as a argument in upper() function ?





โœ… Correct Answer: 4

Return type of the lower() function ?





โœ… Correct Answer: 1

Return type of isupper() function is ?





โœ… Correct Answer: 3

What is return by the islower() function ?





โœ… Correct Answer: 3

string is : r4r.com then string.islower() return





โœ… Correct Answer: 1

string is : this is my string, then title() function return





โœ… Correct Answer: 3

What is return by the isdigit() function ?





โœ… Correct Answer: 3

If every character in string is of numeric type then what value is return by isdigit() function ?





โœ… Correct Answer: 1

What is the use of the isalpha() function in python ?





โœ… Correct Answer: 3

Correct syntax for the isalpha() function





โœ… Correct Answer: 4

correct syntax for the isdigit() function ?





โœ… Correct Answer: 3

What is the use of the replace() function ?





โœ… Correct Answer: 3

Minimum number of argument we require to pass in replace() function ?





โœ… Correct Answer: 2

Third argument in replace() function is





โœ… Correct Answer: 2

Which of the following function is use to change the case of the alphabet in whole string ?





โœ… Correct Answer: 4

string is: MYtext, then swapcase() function return string which is ?





โœ… Correct Answer: 3

Discard() function is only applicable on





โœ… Correct Answer: 1

what is the use of the discard() function ?





โœ… Correct Answer: 2

Which of the following function gives an error if we deleted the unknown item that is not present in set.





โœ… Correct Answer: 1