Python/Python%20MCQS%20-%20Function Sample Test,Sample questions

Question:
acos() function is use for finding the value of

1.inverse of cosine

2.cosine

3.sine

4.inverse of sine

Posted Date:-2019-06-03 12:08:24


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

1.always decrease

2.may be decrease

3.Not increase in any condition

4.2 and 3 are true

Posted Date:-2019-06-03 12:21:37


Question:
Append() function in python is used for

1.Insertion

2.Deletion

3.Clear the data

4.Traverse the data

Posted Date:-2019-06-03 11:12:28


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

1.commas

2.colon

3.dot

4.space

Posted Date:-2019-06-03 11:53:30


Question:
Correct syntax for the isalpha() function

1.isalpha(string)

2.isalpha()

3.string(isalpha())

4.string.isalpha()

Posted Date:-2019-06-03 12:35:43


Question:
correct syntax for the isdigit() function ?

1.isdigit(list)

2.list.isdigt()

3.string.isdigit()

4.isdigit(string)

Posted Date:-2019-06-03 12:36:40


Question:
Discard() function is only applicable on

1.set

2.list

3.dictionary

4.array

Posted Date:-2019-06-03 12:44:27


Question:
eval() is used to find the value of the

1.mathematical function

2.equation

3.log

4.All of the above

Posted Date:-2019-06-03 11:50:01


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

1.seek()

2.tell()

3.key()

4.None of the above

Posted Date:-2019-06-03 11:45:40


Question:
Filter() function is valid on

1.string

2.integer

3.list

4.None of the above

Posted Date:-2019-06-03 12:11:29


Question:
Function that are defined without the use of def keyword are

1.predefined function

2.pass by value function

3.lambda function

4.All of the above

Posted Date:-2019-06-03 10:58:20


Question:
How many argument we pass in append() function ?

1.1

2.2

3.3

4.5

Posted Date:-2019-06-03 11:18:06


Question:
How many argument we pass in map() function ?

1.1

2.2

3.3

4.4

Posted Date:-2019-06-03 12:16:33


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

1.0

2.1

3.3

4.4

Posted Date:-2019-06-03 11:18:55


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

1.1

2.2

3.3

4.Many

Posted Date:-2019-06-03 10:24:12


Question:
How we convert the list into the numpy array ?

1.array(list)

2.Numpy(list)

3.Numpy.array(list)

4.list.array()

Posted Date:-2019-06-03 11:34:48


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

1.By Ascii() function

2.By tejh() function

3.By ord() function

4.All of the above

Posted Date:-2019-06-03 10:56:54


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

1.True

2.False

3.True or False

4.None of the above

Posted Date:-2019-06-03 12:33:08


Question:
If function is defined inside the class then it is called

1.Modue

2.class

3.Object

4.Method

Posted Date:-2019-06-03 11:10:20


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

1.Colon

2.Commas

3.Semicolon

4.None of the above

Posted Date:-2019-06-03 11:00:16


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

1.set

2.Dictionary

3.List

4.string

Posted Date:-2019-06-03 10:51:48


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

1.Yes

2.No

3.Depends on type of filter() function

4.Depends on type of lambda function

Posted Date:-2019-06-03 12:22:44


Question:
It is possible to create list inside another list ?

1.Yes, it is nested list

2.No, it will give an error

3.Yes, it is dynamic list

4.None of the above

Posted Date:-2019-06-03 10:53:24


Question:
list() function return the

1.set

2.dictionary

3.list

4.All of the above

Posted Date:-2019-06-03 10:35:08


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

1.1

2.2

3.3

4.4

Posted Date:-2019-06-03 12:39:13


Question:
Name the inbuld function of the python

1.pow

2.list

3.set

4.All of the above

Posted Date:-2019-06-03 10:33:21


Question:
Number of argument pass in index() function ?

1.1

2.2

3.3

4.4

Posted Date:-2019-06-03 11:17:35


Question:
Number of argument to pass in sleep() function ?

1.1

2.2

3.3

4.4

Posted Date:-2019-06-03 11:47:13


Question:
Number of argument we pass in sum() function ?

1.1

2.2

3.3

4.As much we want

Posted Date:-2019-06-03 12:03:34


Question:
numpy.array() is a function which convert

1.list to array

2.array to list

3.string to array

4.array to string

Posted Date:-2019-06-03 11:34:01


Question:
ord() function in Python return the 

1.Octal number

2.Ascii value

3.Decimal Number

4.All of the above

Posted Date:-2019-06-03 10:23:07


Question:
pop() function is valid on 

1.list

2.set

3.Both list and set

4.None of the above

Posted Date:-2019-06-03 11:35:44


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

1.pandas

2.Numpy

3.Opencv

4.math

Posted Date:-2019-06-03 12:01:44


Question:
remove() function is valid on

1.List

2.Set

3.List and set

4.None of the above

Posted Date:-2019-06-03 11:36:26


Question:
Return type of index() function in python list ?

1.String

2.Number

3.char

4.list

Posted Date:-2019-06-03 11:15:53


Question:
Return type of isupper() function is ?

1.True

2.False

3.True or False

4.None of the above

Posted Date:-2019-06-03 12:27:43


Question:
Return type of split() function ?

1.string

2.array

3.set

4.list

Posted Date:-2019-06-03 11:52:48


Question:
Return type of the input() function is always

1.string

2.integer

3.any data type

4.None of the above

Posted Date:-2019-06-03 11:58:31


Question:
Return type of the lower() function ?

1.string

2.integer

3.list

4.array

Posted Date:-2019-06-03 12:26:45


Question:
set(list) remove the

1.all items from the list

2.last item in list

3.all character item in list

4.all duplicate item in list

Posted Date:-2019-06-03 11:32:27


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

1.sina

2.asin

3.sini

4.isin

Posted Date:-2019-06-03 10:36:37


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

1.True

2.False

3.True or False

4.None of the above

Posted Date:-2019-06-03 12:29:28


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

1.This is my string

2.[ This,is,my,string ]

3.This Is My String

4.All of the above

Posted Date:-2019-06-03 12:31:28


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

1.MyText

2.MYTEXT

3.myTEXT

4.None of the above

Posted Date:-2019-06-03 12:42:56


Question:
Third argument in replace() function is

1.string

2.integer

3.list

4.array

Posted Date:-2019-06-03 12:40:19


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

1.add()

2.sum()

3.Not possible

4.None of the above

Posted Date:-2019-06-03 12:03:00


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

1.Lower() function

2.Upper() function

3.changecase() function

4.case() function

Posted Date:-2019-06-03 12:24:35


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

1.Lower() function

2.Upper() function

3.changecase() function

4.case() function

Posted Date:-2019-06-03 12:25:05


Question:
To convert numeric string into integer which function we use ?

1.str()

2.int()

3.char()

4.type()

Posted Date:-2019-06-03 11:59:21


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

1.copysign()

2.signcopy()

3.copy()

4.None of the above

Posted Date:-2019-06-03 12:14:34


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

1.ord

2.type

3.filter

4.lambda

Posted Date:-2019-06-03 10:27:43


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

1.Yes

2.No

3.Not to say

4.pow() is also not valid

Posted Date:-2019-06-03 12:05:02


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

1.tana

2.atan

3.tani

4.itan

Posted Date:-2019-06-03 12:06:41


Question:
type() function in python is

1.User defined function

2.Predefined function

3.It is not function

4.None of the above

Posted Date:-2019-06-03 10:26:40


Question:
What is return by the isdigit() function ?

1.True

2.False

3.True or False

4.None of the above

Posted Date:-2019-06-03 12:32:17


Question:
What is return by the islower() function ?

1.True

2.False

3.True or False

4.None of the above

Posted Date:-2019-06-03 12:28:19


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

1.int

2.char

3.string

4.All of the above

Posted Date:-2019-06-03 10:42:17


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

1.int

2.char

3.array

4.None of the above

Posted Date:-2019-06-03 10:40:36


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

1.123

2.Ascii value

3.Error

4.None of the above

Posted Date:-2019-06-03 10:50:30


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

1.It check the available file

2.It return the number of character in file

3.Return file type

4.None of the above

Posted Date:-2019-06-03 11:43:34


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

1.Insert new item at beginning

2.Insert new item at the end

3.Insert new item at specified position

4.All of the above

Posted Date:-2019-06-03 11:11:47


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

1.Count the number of item in list

2.Count the occurrence of any item

3.Both of the above

4.None of the above

Posted Date:-2019-06-03 11:14:58


Question:
what is the use of the discard() function ?

1.Insertion

2.Removing

3.counting

4.Swapping

Posted Date:-2019-06-03 12:45:22


Question:
What is the use of the filter() function ?

1.collect some item from sequence

2.collect all item from sequence

3.both may be valid

4.None of the above

Posted Date:-2019-06-03 12:10:58


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

1.Find the type of the list

2.Find the index value of the item

3.Count the number of items

4.None of the above

Posted Date:-2019-06-03 11:13:29


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

1.It is also used for print the statement

2.It get the value from the user side

3.Both of the above

4.None of the above

Posted Date:-2019-06-03 11:57:24


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

1.It check the list for alphabet

2.It check the array for alphabet

3.It check the string for alphabet

4.All of the above

Posted Date:-2019-06-03 12:34:49


Question:
What is the use of the map() function ?

1.to assign the value

2.to change the sequence order

3.to change the data type in the sequence

4.to change the data type of the sequence

Posted Date:-2019-06-03 12:13:11


Question:
What is the use of the replace() function ?

1.replace the list by string

2.replace the string by list

3.replace content of string by other string

4.All of the above

Posted Date:-2019-06-03 12:38:22


Question:
What is the work of the split() function ?

1.list to string

2.string to list

3.array to list

4.list to array

Posted Date:-2019-06-03 11:51:14


Question:
What the append() function returns ?

1.list

2.set

3.string

4.integer

Posted Date:-2019-06-03 10:48:47


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

1.Anything

2.Only integer

3.Only list

4.Only Character

Posted Date:-2019-06-03 10:54:36


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

1.integer

2.list

3.array

4.None of the above

Posted Date:-2019-06-03 12:25:54


Question:
What we pass in index() function ?

1.Number

2.String

3.List

4.All of the above

Posted Date:-2019-06-03 11:16:53


Question:
What we pass in ord() function ?

1.Any character

2.Alphabet

3.Number

4.Only special character

Posted Date:-2019-06-03 10:25:17


Question:
What we pass in split() function ?

1.string

2.integer

3.list

4.array

Posted Date:-2019-06-03 11:51:50


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

1.function

2.sequence

3.Both of the above

4.None of the above

Posted Date:-2019-06-03 12:17:30


Question:
Which keyword we use to define a function ?

1.void

2.int

3.any type

4.def

Posted Date:-2019-06-03 10:34:09


Question:
Which of the following are used in function

1.()

2.[]

3.{}

4.None of the above

Posted Date:-2019-06-03 10:29:09


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

1.sort()

2.sorting()

3.Both of the above

4.None of the above

Posted Date:-2019-06-03 11:23:31


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

1.integer

2.string

3.list

4.list with char elements

Posted Date:-2019-06-03 10:46:06


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

1.type

2.dtype

3.Both of the above

4.None of the above

Posted Date:-2019-06-03 10:28:46


Question:
Which of the following function are valid on list ?

1.append

2.pop

3.index

4.All of the above

Posted Date:-2019-06-03 10:47:18


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

1.discard()

2.remove()

3.Both of the above

4.None of the above

Posted Date:-2019-06-03 12:47:55


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

1.append()

2.push()

3.insert()

4.All of the above

Posted Date:-2019-06-03 11:19:53


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

1.write()

2.read()

3.append()

4.All of the above

Posted Date:-2019-06-03 11:38:42


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

1.changecase()

2.case()

3.caseswap()

4.swapcase()

Posted Date:-2019-06-03 12:42:00


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

1.str()

2.int()

3.char()

4.chr()

Posted Date:-2019-06-03 12:00:22


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

1.count()

2.char()

3.tell()

4.key()

Posted Date:-2019-06-03 11:44:23


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

1.fuctionname[]

2.def functionname

3.def functionname()

4.def functionname():

Posted Date:-2019-06-03 10:38:32


Question:
Which of the following is not a predefined function in python

1.ord()

2.filter()

3.join()

4.None of the above

Posted Date:-2019-06-03 10:32:41


Question:
Which of the following is not the function of list ?

1.append

2.push

3.pop

4.index

Posted Date:-2019-06-03 10:47:46


Question:
Which of the following is returned by the join function ?

1.string

2.list

3.char

4.integer value

Posted Date:-2019-06-03 10:43:17


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

1.read()

2.readline()

3.readlines()

4.All of the above

Posted Date:-2019-06-03 11:40:08


Question:
Which of the following is valid for reverse the sequence ?

1.reverse()

2.reversed()

3.Both of the above

4.None of the above

Posted Date:-2019-06-03 11:30:51


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

1.cosa

2.acos

3.cosi

4.icos

Posted Date:-2019-06-03 12:07:27


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

1.scan()

2.scanf()

3.scand()

4.input()

Posted Date:-2019-06-03 11:54:58


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

1.pause()

2.break()

3.sleep()

4.require()

Posted Date:-2019-06-03 11:46:47


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

1.append()

2.pop()

3.clear()

4.All of the above

Posted Date:-2019-06-03 11:20:57


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

1.User defined function

2.Build In function

3.lambda function

4.All of the above

Posted Date:-2019-06-03 12:19:13


More MCQS

  1. Python MCQS - Function
  2. Python MCQS - GUI in python
  3. Python MCQS - Operators
  4. Python MCQS - Data type in python
  5. Python MCQS - loops in python
  6. Python MCQS - Numpy
  7. Python MCQS - sqlite3
  8. Python MCQS - Library
  9. Python MCQS - Pandas
  10. Python MCQs
  11. Dictionary Python MCQ set 1
  12. Dictionary Python MCQ set 2
  13. MCQ For Python Fundamentals
  14. MCQ Introduction to Python Section 1
  15. MCQ Introduction to Python Section 2
  16. MCQ Introduction to Python Section 3
  17. MCQ on Flow of Control in Python Set 1
  18. MCQ on Flow of Control in Python Set 2
  19. MCQ on Python String Set 1
  20. File Handling in Python section 1
  21. File Handling in Python section 2
  22. Python Functions MCQS Set 1
  23. Python Functions MCQS Set 2
  24. MCQ on List in Python
  25. Pandas MCQ Questions Set 1
  26. Pandas MCQ Questions Set 2
  27. Tuple MCQ in Python
  28. Python dataframe MCQ
  29. Python Mcq Set 1
  30. Python Mcq Set 2
  31. Python Mcq Set 3
  32. Python Mcq Set 4
  33. Python Mcq Set 5
  34. Python Mcq Set 6
  35. Python Mcq Set 7
  36. Python Mcq Set 8
  37. Python Mcq Set 9
  38. Python Mcq Set 10
  39. Python Mcq Set 11
  40. Python Mcq Set 12
  41. Python Mcq Set 13
  42. Python Mcq Set 14
  43. Python Mcq Set 15
  44. Python Mcq Set 16
  45. Python Mcq Set 17
  46. Python Mcq Set 18
  47. Python Mcq Set 19
  48. Python Mcq Set 20
  49. Python Mcq Set 21
  50. Python MCQ
  51. Python MCQ Questions with Answer
  52. Test
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!