Program code making use of a given module is called a ______ of the module.
1.Client
2.Docstring
3.Interface
4.Modularity
Posted Date:-2022-01-02 07:37:49
What will be the output of the following Python code? x = 'abcd' print(list(map(list, x)))
1.[‘a’, ‘b’, ‘c’, ‘d’]
2. [‘abcd’]
3.[[‘a’], [‘b’], [‘c’], [‘d’]]
4.none of the mentioned
Posted Date:-2022-01-02 07:33:10
What will be the output of the following Python code? x = abcd print(list(map(list, x)))
1.[‘a’, ‘b’, ‘c’, ‘d’]
2.[‘abcd’]
3.[[‘a’], [‘b’], [‘c’], [‘d’]]
4.none of the mentioned
Posted Date:-2022-01-02 07:33:38
What will be the output of the following Python code? x = [34, 56] print(len(map(str, x)))
1. [34, 56]
2. [’34’, ’56’]
3.34 56
4.error
Posted Date:-2022-01-02 07:32:43
What will be the output of the following Python code? x = [[0], [1]] print((' '.join(list(map(str, x)))))
1.(‘[0] [1]’,)
2.(’01’,)
3. [0] [1]
4.01
Posted Date:-2022-01-02 07:31:15
Which of the following is not a valid namespace?
1.Global namespace
2. Public namespace
3.Built-in namespace
4.Local namespace
Posted Date:-2022-01-02 07:42:07
______ is a string literal denoted by triple quotes for providing the specifications of certain program elements.
1.Interface
2.Modularity
3.Client
4.Docstring
Posted Date:-2022-01-02 07:38:17
Is the output of the function abs() the same as that of the function math.fabs()?
1.sometimes
2.always
3.never
4.none of the mentioned
Posted Date:-2022-01-02 07:51:00
What is displayed on executing print(math.fabs(-3.4))?
1.-3.4
2.3.4
3.3
4. -3
Posted Date:-2022-01-02 07:48:03
What is math.factorial(4.0)?
1. 24
2.1
3. error
4.none of the mentioned
Posted Date:-2022-01-02 07:52:17
What is math.floor(0o10)?
1.8
2.10
3.0
4.9
Posted Date:-2022-01-02 07:53:01
What is returned by math.ceil(3.4)?
1.3
2.4
3.4.0
4. 3.0
Posted Date:-2022-01-02 07:45:58
What is the value of x if x = math.factorial(0)?
1. 0
2.1
3.error
4.none of the mentioned
Posted Date:-2022-01-02 07:51:49
What is the value returned by math.fact(6)?
1. 720
2.6
3.[1, 2, 3, 6]
4. error
Posted Date:-2022-01-02 07:51:25
What is the value returned by math.floor(3.4)?
1.3
2.4
3.4.0
4.3.0
Posted Date:-2022-01-02 07:46:22
What will be the output of print(math.copysign(3, -1))?
1.1
2.1.0
3. -3
4.-3.0
Posted Date:-2022-01-02 07:47:13
What will be the output of print(math.factorial(4.5))?
1.24
2. 120
3. error
4. 24.0
Posted Date:-2022-01-02 07:52:38
What will be the output of the following Python code? #mod1 def change(a): b=[x*2 for x in a] print(b) #mod2 def change(a): b=[x*x for x in a] print(b) from mod1 import change from mod2 import change #main s=[1,2,3] change(s)
1. [2,4,6]
2.[1,4,9]
3.[2,4,6] [1,4,9]
4.There is a name clash
Posted Date:-2022-01-02 07:39:21
What will be the output of the following Python code? def to_upper(k): k.upper() x = ['ab', 'cd'] print(list(map(to_upper, x)))
1. [‘AB’, ‘CD’]
2.[‘ab’, ‘cd’]
3.none of the mentioned
4.error
Posted Date:-2022-01-02 07:19:55
What will be the output of the following Python code? def to_upper(k): return k.upper() x = ['ab', 'cd'] print(list(map(to_upper, x)))
1.[‘AB’, ‘CD’]
2.[‘ab’, ‘cd’]
3.none of the mentioned
4. error
Posted Date:-2022-01-02 07:18:09
What will be the output of the following Python code? def to_upper(k): return k.upper() x = ['ab', 'cd'] print(list(map(upper, x)))
1. [‘AB’, ‘CD’]
2. [‘ab’, ‘cd’]
3.none of the mentioned
4. error
Posted Date:-2022-01-02 07:17:44
What will be the output of the following Python code? elements = [0, 1, 2] def incr(x): return x+1 print(list(map(elements, incr)))
1.[1, 2, 3]
2.[0, 1, 2]
3.error
4.none of the mentioned
Posted Date:-2022-01-02 07:16:25
What will be the output of the following Python code? elements = [0, 1, 2] def incr(x): return x+1 print(list(map(incr, elements)))
1. [1, 2, 3]
2.[0, 1, 2]
3.error
4.none of the mentioned
Posted Date:-2022-01-02 07:16:54
What will be the output of the following Python code? from math import factorial print(math.factorial(5))
1.120
2.Nothing is printed
3.Error, method factorial doesn’t exist in math module
4.Error, the statement should be: print(factorial(5))
Posted Date:-2022-01-02 07:44:38
What will be the output of the following Python code? x = 'abcd' print(list(map([], x)))
1. [‘a’, ‘b’, ‘c’, ‘d’]
2.[‘abcd’]
3. [[‘a’], [‘b’], [‘c’], [‘d’]]
4.none of the mentioned
Posted Date:-2022-01-02 07:34:56
What will be the output of the following Python code? x = 1234 print(list(map(list, x)))
1. [1, 2, 3, 4]
2. [1234]
3. [[1], [2], [3], [4]]
4.none of the mentioned
Posted Date:-2022-01-02 07:34:03
What will be the output of the following Python code? x = 1234 print(list(map(list, [x])))
1.[1, 2, 3, 4]
2. [1234]
3. [[1], [2], [3], [4]]
4.none of the mentioned
Posted Date:-2022-01-02 07:34:31
What will be the output of the following Python code? x = ['ab', 'cd'] print(len(list(map(list, x))))
1. 2
2.4
3. error
4.none of the mentioned
Posted Date:-2022-01-02 07:22:00
What will be the output of the following Python code? x = ['ab', 'cd'] print(len(list(map(list, x))))))
1.2
2. 4
3. error
4.none of the mentioned
Posted Date:-2022-01-02 07:23:23
What will be the output of the following Python code? x = ['ab', 'cd'] print(len(map(list, x)))
1. [2, 2]
2.2
3. 4
4.none of the mentioned
Posted Date:-2022-01-02 07:21:33
What will be the output of the following Python code? x = ['ab', 'cd'] print(list(map(len, x)))
1.[‘ab’, ‘cd’]
2. [2, 2]
3.[‘2’, ‘2’]
4. None of the mentioned
Posted Date:-2022-01-02 07:21:06
What will be the output of the following Python code? x = ['ab', 'cd'] print(list(map(list, x)))
1.[‘a’, ‘b’, ‘c’, ‘d’]
2.[[‘ab’], [‘cd’]]
3.[[‘a’, ‘b’], [‘c’, ‘d’]]
4.none of the mentioned
Posted Date:-2022-01-02 07:24:24
What will be the output of the following Python code? x = ['ab', 'cd'] print(list(map(upper, x)))
1. [‘AB’, ‘CD’]
2.[‘ab’, ‘cd’]
3. error
4.none of the mentioned
Posted Date:-2022-01-02 07:17:19
What will be the output of the following Python code? x = ['ab', 'cd'] print(map(len, x))
1.[‘ab’, ‘cd’]
2. [2, 2]
3. [‘2’, ‘2’]
4. None of the mentioned
Posted Date:-2022-01-02 07:20:43
What will be the output of the following Python code? x = [12, 34] print(len(' '.join(list(map(int, x)))))
1. 4
2.5
3.6
4.error
Posted Date:-2022-01-02 07:29:09
What will be the output of the following Python code? x = [12, 34] print(len(''.join(list(map(int, x)))))
1. 4
2. 2
3. error
4.none of the mentioned
Posted Date:-2022-01-02 07:27:54
What will be the output of the following Python code? x = [12, 34] print(len(''.join(list(map(str, x)))))
1.4
2. 5
3.6
4.error
Posted Date:-2022-01-02 07:28:27
What will be the output of the following Python code? x = [12, 34] print(len(list(map(int, x))))
1.2
2.1
3.error
4.none of the mentioned
Posted Date:-2022-01-02 07:27:18
What will be the output of the following Python code? x = [12, 34] print(len(list(map(len, x))))
1.2
2.1
3.error
4.none of the mentioned
Posted Date:-2022-01-02 07:26:50
What will be the output of the following Python code? x = [12.1, 34.0] print(' '.join(list(map(str, x))))
1.12 1 34 0
2. 12.1 34
3.121 340
4.12.1 34.0
Posted Date:-2022-01-02 07:30:02
What will be the output of the following Python code? x = [12.1, 34.0] print(len(' '.join(list(map(str, x)))))
1. 6
2. 8
3.9
4.error
Posted Date:-2022-01-02 07:29:37
What will be the output of the following Python code? x = [34, 56] print((''.join(list(map(str, x)))),)
1.3456
2.(3456)
3.(‘3456’)
4. (‘3456’,)
Posted Date:-2022-01-02 07:32:18
What will be the output of the following Python code? x = [34, 56] print((''.join(list(map(str, x))),))
1.3456
2. (3456)
3.(‘3456’)
4.(‘3456’,)
Posted Date:-2022-01-02 07:31:53
What will be the output of the following Python code? x = [[0], [1]] print(len(' '.join(list(map(str, x)))))
1.2
2. 3
3.7
4.8
Posted Date:-2022-01-02 07:30:29
Which of the following is false about “from-import†form of import?
1.The syntax is: from modulename import identifier
2. This form of import prevents name clash
3.The namespace of imported module becomes part of importing module
4.The identifiers in module are accessed directly as: identifier
Posted Date:-2022-01-02 07:43:40
Which of the following is false about “import modulename†form of import?
1. The namespace of imported module becomes part of importing module
2.This form of import prevents name clash
3.The namespace of imported module becomes available to importing module
4. The identifiers in module are accessed as: modulename.identifier
Posted Date:-2022-01-02 07:43:08
Which of the following is not an advantage of using modules?
1. Provides a means of reuse of program code
2.Provides a means of dividing up tasks
3.Provides a means of reducing the size of the program
4.Provides a means of testing individual parts of the program
Posted Date:-2022-01-02 07:37:21
Which of the following is true about top-down design process?
1. The details of a program design are addressed before the overall design
2.Only the details of the program are addressed
3.The overall design of the program is addressed before the details
4.Only the design of the program is addressed
Posted Date:-2022-01-02 07:38:44
Which of the following isn’t true about main modules?
1.When a python file is directly executed, it is considered main module of a program
2.Main modules may import any number of modules
3.Special name given to main modules is: __main__
4.Other main modules can import main modules
Posted Date:-2022-01-02 07:41:03
Which of the statements about modules is false?
1. In the “from-import†form of import, identifiers beginning with two underscores are private and aren’t imported
2.dir() built-in function monitors the items in the namespace of the main module
3.In the “from-import†form of import, all identifiers regardless of whether they are private or public are imported
4.When a module is loaded, a compiled version of the module with file extension .pyc is automatically produced
Posted Date:-2022-01-02 07:44:10
Which of these definitions correctly describes a module?
1.Denoted by triple quotes for providing the specification of certain program elements
2.Design and implementation of specific functionality to be incorporated into a program
3.Defines the specification of how it is to be used
4.Any program that reuses code
Posted Date:-2022-01-02 07:36:56
which of these is false about a package?
1. A package can have subfolders and modules
2.Each import package need not introduce a namespace
3. import folder.subfolder.mod1 imports packages
4.from folder.subfolder.mod1 import objects imports packages
Posted Date:-2022-01-02 07:35:51