Given a function that does not return any value, What value is thrown by default when executed in shell.
1. int
2.bool
3.void
4.None
Posted Date:-2021-12-29 23:14:53
Is Python case sensitive when dealing with identifiers?
1. yes
2.no
3.machine dependent
4.none of the mentioned
Posted Date:-2021-12-29 19:27:27
Select all options that print. hello-how-are-you
1.print(‘hello’, ‘how’, ‘are’, ‘you’)
2.print(‘hello’, ‘how’, ‘are’, ‘you’ + ‘-‘ * 4)
3.print(‘hello-‘ + ‘how-are-you’)
4.print(‘hello’ + ‘-‘ + ‘how’ + ‘-‘ + ‘are’ + ‘you’)
Posted Date:-2021-12-29 23:19:49
What data type is the object below? L = [1, 23, 'hello', 1]
1. list
2.dictionary
3.array
4. tuple
Posted Date:-2021-12-29 23:17:43
What is the output of print 0.1 + 0.2 == 0.3?
1.True
2. False
3.Machine dependent
4.Error
Posted Date:-2021-12-29 23:21:04
What is the type of inf?
1.Boolean
2.Integer
3.Float
4.Complex
Posted Date:-2021-12-29 23:22:03
Which of the following is incorrect?
1.float(‘inf’)
2.float(‘nan’)
3. float(’56’+’78’)
4.float(’12+34′)
Posted Date:-2021-12-29 23:24:34
Evaluate the expression given below if A = 16 and B = 15. A % B // A
1. 0.0
2. 0
3. 1.0
4. 1
Posted Date:-2021-12-29 23:27:35
In order to store values in terms of key and value we use what core data type.
1. list
2. tuple
3.class
4.Dictionary
Posted Date:-2021-12-29 23:18:06
In python we do not specify types, it is directly interpreted by the compiler, so consider the following operation to be performed. >>>x = 13 ? 2 objective is to make sure x has a integer value, select all that apply (python 3.xx)
1.x = 13 // 2
2. x = int(13 / 2)
3.x = 13 % 2
4.all of the mentioned
Posted Date:-2021-12-29 23:16:47
Operators with the same precedence are evaluated in which manner?
1. Left to Right
2.Right to Left
3.Can’t say
4.none of the mentioned
Posted Date:-2021-12-29 23:03:28
What are the values of the following Python expressions? 2**(3**2) (2**3)**2 2**3**2
1.64, 512, 64
2.64, 64, 64
3.512, 512, 512
4.512, 64, 512
Posted Date:-2021-12-29 23:29:48
What does ~~~~~~5 evaluate to?
1. +5
2.-11
3.+11
4. -5
Posted Date:-2021-12-29 23:22:55
What does ~4 evaluate to?
1. -5
2.-4
3.-3
4.+3
Posted Date:-2021-12-29 23:22:27
What does 3 ^ 4 evaluate to?
1. 81
2.12
3. 0.75
4. 7
Posted Date:-2021-12-29 23:25:32
What error occurs when you execute the following Python code snippet? apple = mango
1.SyntaxError
2.NameError
3. ValueError
4. TypeError
Posted Date:-2021-12-29 23:17:11
What is the answer to this expression, 22 % 3 is?
1.7
2. 1
3. 0
4.5
Posted Date:-2021-12-29 23:02:57
What is the maximum possible length of an identifier?
1.31 characters
2.63 characters
3.79 characters
4.none of the mentioned
Posted Date:-2021-12-29 19:27:59
What is the output of this expression, 3*1**3?
1. 27
2.9
3.3
4. 1
Posted Date:-2021-12-29 23:03:50
What is the result of cmp(3, 1)?
1. 1
2.0
3.True
4.False
Posted Date:-2021-12-29 23:24:03
What is the result of round(0.5) – round(-0.5)?
1.1.0
2.2.0
3. 0.0
4.Value depends on Python version
Posted Date:-2021-12-29 23:25:05
What is the return type of function id?
1.int
2.float
3.bool
4. dict
Posted Date:-2021-12-29 23:16:05
What is the return value of trunc()?
1.int
2.bool
3.float
4.None
Posted Date:-2021-12-29 23:20:11
What is the value of the following expression? 2+4.00, 2**4.0
1. (6.0, 16.0)
2. (6.00, 16.00)
3.(6, 16)
4.(6.00, 16.0)
Posted Date:-2021-12-29 23:28:50
What is the value of the following expression? 8/4/2, 8/(4/2)
1. (1.0, 4.0)
2.(1.0, 1.0)
3.(4.0. 1.0)
4.(4.0, 4.0)
Posted Date:-2021-12-29 23:30:09
What is the value of the following expression? float(22//3+3/3)
1.8
2.8.0
3.8.3
4.8.33
Posted Date:-2021-12-29 23:30:31
What will be the output of the following Python expression? 24//6%3, 24//4//2
1. (1,3)
2. (0,3)
3.(1,0)
4.(3,1)
Posted Date:-2021-12-30 00:20:56
What will be the output of the following Python expression? print(4.00/(2.0+2.0))
1. Error
2.1.0
3.1.00
4.1
Posted Date:-2021-12-29 23:31:38
What will be the value of the following Python expression? 4 + 3 % 5
1. 4
2.7
3.2
4.0
Posted Date:-2021-12-29 23:27:03
What will be the value of the following Python expression? 4+2**5//10
1.3
2.7
3. 77
4.0
Posted Date:-2021-12-30 00:23:12
What will be the value of the following Python expression? float(4+int(2.39)%2)
1. 5.0
2.5
3.4.0
4.4
Posted Date:-2021-12-30 00:21:52
What will be the value of X in the following Python expression? X = 2+9*((3*12)-8)/10
1.30.0
2. 30.8
3.28.4
4.27.2
Posted Date:-2021-12-30 00:20:02
What will be the value of x in the following Python expression? x = int(43.55+2/2)
1.43
2. 44
3. 22
4.23
Posted Date:-2021-12-29 23:28:27
Which among the following list of operators has the highest precedence? +, -, **, %, /, <<, >>, |
1. <<, >>
2.**
3.|
4.%
Posted Date:-2021-12-30 00:21:24
Which is the correct operator for power(xy)?
1.X^y
2.X**y
3. X^^y
4.none of the mentioned
Posted Date:-2021-12-29 23:02:01
Which of the following expressions involves coercion when evaluated in Python?
1.4.7 – 1.5
2.7.9 * 6.3
3.1.7 % 2
4.3.4 + 4.6
Posted Date:-2021-12-30 00:20:26
Which of the following expressions is an example of type conversion?
1. 4.0 + float(3)
2. 5.3 + 6.3
3.5.0 + 3
4. 3 + 7
Posted Date:-2021-12-30 00:22:21
Which of the following expressions results in an error?
1.float(‘10’)
2.int(‘10’)
3.float(’10.8’)
4. int(’10.8’)
Posted Date:-2021-12-30 00:22:46
Which of the following is an invalid variable?
1.my_string_1
2.1st_string
3.foo
4. _
Posted Date:-2021-12-29 19:28:50
Which of the following is incorrect?
1. x = 0b101
2. x = 0x4f5
3. x = 19023
4.x = 03964
Posted Date:-2021-12-29 23:23:29
Which of the following is invalid?
1. _a = 1
2. __a = 1
3.__str__ = 1
4.none of the mentioned
Posted Date:-2021-12-29 19:28:23
Which of the following is not a complex number?
1.k = 2 + 3j
2. k = complex(2, 3)
3.k = 2 + 3l
4.k = 2 + 3J
Posted Date:-2021-12-29 23:21:38
Which of the following is not a keyword?
1. eval
2.assert
3.nonlocal
4. pass
Posted Date:-2021-12-29 19:29:44
Which of the following is the truncation division operator?
1. /
2.%
3. //
4. |
Posted Date:-2021-12-29 23:29:18
Which of the following operators has its associativity from right to left?
1. +
2. //
3.%
4.**
Posted Date:-2021-12-29 23:28:04
Which of the following results in a SyntaxError?
1. ‘”Once upon a time…”, she said.’
2.“He said, ‘Yes!'”
3. ‘3’
4. ”’That’s okay”’
Posted Date:-2021-12-29 23:18:59
Which of the following will run without errors?
1.round(45.8)
2.round(6352.898,2,5)
3.round()
4. round(7463.123,2,1)
Posted Date:-2021-12-29 23:15:25
Which of these in not a core data type?
1. Lists
2. Dictionary
3. Tuples
4. Class
Posted Date:-2021-12-29 23:14:03
Which one of these is floor division?
1. /
2. //
3.%
4.none of the mentioned
Posted Date:-2021-12-29 23:02:26
Why are local variable names beginning with an underscore discouraged?
1. they are used to indicate a private variables of a class
2. they confuse the interpreter
3.they are used to indicate global variables
4. they slow down execution
Posted Date:-2021-12-29 19:29:21