## Python Certification Exam Preparation Set 48

##### What is the value of the following expression?`2+4.00, 2**4.0`

Options are :

• (6.0, 16.0) (Correct)
• (6.00, 16.00)
• (6, 16)
• (6.00, 16.0)

##### The result of the expression shown above is (6.0, 16.0). This is because the result is automatically rounded off to one decimal place.

Options are :

• 123The time taken for the execution of the code (Correct)
• 3The time taken for the execution of the code
• 123UTC time
• 3UTC time

Answer :123The time taken for the execution of the code

Options are :

• [-4, 16]
• Error
• -416

##### What is the output of the following?def to_upper(k): k.upper()x = ['ab', 'cd']print(list(map(to_upper, x)))

Options are :

• ['AB', 'CD'].
• ['ab', 'cd'].
• none of the mentioned (Correct)
• error

Options are :

• 4 (Correct)
• 5
• 6
• Error

##### What is the output of the following?x = abcdprint(list(map(list, x)))

Options are :

• ['a', 'b', 'c', 'd'].
• ['abcd'].
• [['a'], ['b'], ['c'], ['d']].
• none of the mentioned (Correct)

##### Is the output of the function abs() the same as that of the function math.fabs()?

Options are :

• sometimes (Correct)
• always
• never
• none of the mentioned

##### What is returned by math.isfinite(float('nan'))?

Options are :

• True
• False (Correct)
• None
• error

##### What is the default base used when math.log(x) is found?

Options are :

• e (Correct)
• 10
• 2
• none of the mentioned

Options are :

• name of the current user logged in (Correct)
• name of the superuser
• gets a form to login as a different user
• all of the above

Answer :name of the current user logged in

Options are :

• 4 (Correct)
• 5
• 3
• 6

##### Which of the following is true about top-down design process?

Options are :

• The details of a program design are addressed before the overall design
• Only the details of the program are addressed
• The overall design of the program is addressed before the details (Correct)
• Only the design of the program is addressed

Answer :The overall design of the program is addressed before the details

##### What is the output of the function shown below (random module has already been imported)?random.choice('sun')

Options are :

• sun
• u
• either s, u or n (Correct)
• error

Answer :either s, u or n

##### Which of the following will not be returned by random.choice("1 ,")?

Options are :

• 1
• (space)
• ,
• none of the mentioned (Correct)

##### What is the output of this code?import syseval(sys.stdin.readline())"India"

Options are :

• India5
• India
• 'India\n'
• 'India' (Correct)

##### Which of the following functions does not accept any arguments?

Options are :

• position (Correct)
• fillcolor
• goto

##### What is the output of the following code?import turtlet=turtle.Pen()t.right(90)t.forward(100)t.heading()

Options are :

• 0.0
• 90.0
• 270.0 (Correct)
• 360.0

Options are :

• X
• N
• T (Correct)
• M

##### What will be the output of the following Python code?`x = [[0], [1]]print((' '.join(list(map(str, x)))))`

Options are :

• ('[0] [1]',)
• ('01',)
• [0] [1] (Correct)
• 01

##### What will be the output of the following Python code?`x = [[0], [1]]print((' '.join(list(map(str, x))),))`

Options are :

• ('[0] [1]',) (Correct)
• ('01')
• [0] [1]
• 01

##### What will be the output of the following Python code?`x = [34, 56]print((''.join(list(map(str, x))),))`

Options are :

• 3456
• (3456)
• ('3456')
• ('3456',) (Correct)

##### What will be the output of the following Python code?`x = [34, 56]print((''.join(list(map(str, x)))),)`

Options are :

• 3456 (Correct)
• (3456)
• ('3456')
• ('3456',)

##### What will be the output of the following Python code?`x = [34, 56]print(len(map(str, x)))`

Options are :

• [34, 56]
• ['34', '56']
• 34 56
• error (Correct)

##### What will be the output of the following Python code?`x = 'abcd'print(list(map(list, x)))`

Options are :

• ['a', 'b', 'c', 'd']
• ['abcd']
• [['a'], ['b'], ['c'], ['d']] (Correct)
• none of the mentioned

##### What will be the output of the following Python code?`x = abcdprint(list(map(list, x)))`

Options are :

• ['a', 'b', 'c', 'd']
• ['abcd']
• [['a'], ['b'], ['c'], ['d']]
• none of the mentioned (Correct)

##### What will be the output of the following Python code?`x = 1234print(list(map(list, x)))`

Options are :

• [1, 2, 3, 4]
• [1234]
• [[1], [2], [3], [4]]
• none of the mentioned (Correct)

##### What will be the output of the following Python code?`x = 1234print(list(map(list, [x])))`

Options are :

• [1, 2, 3, 4]
• [1234]
• [[1], [2], [3], [4]]
• none of the mentioned (Correct)

##### What will be the output of the following Python code?`x = 'abcd'print(list(map([], x)))`

Options are :

• ['a', 'b', 'c', 'd']
• ['abcd']
• [['a'], ['b'], ['c'], ['d']]
• none of the mentioned (Correct)

##### Is Python code compiled or interpreted?

Options are :

• Python code is only compiled
• Python code is both compiled and interpreted (Correct)
• Python code is only interpreted
• Python code is neither compiled nor interpreted

Answer :Python code is both compiled and interpreted

##### Which of these is the definition for packages in Python?

Options are :

• A folder of python modules (Correct)
• A set of programs making use of Python modules
• A set of main modules
• A number of files containing Python definitions and statements

Answer :A folder of python modules

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions