Problem Solving And Python Programming Set 26
On This Page
This set of Problem Solving and Python Programming Multiple Choice Questions & Answers (MCQs) focuses on Problem Solving And Python Programming Set 26
Q1 | '))
- {97: 49, 98: 50, 99: 51}
- {65: 49, 66: 50, 67: 51}
- 321
- 123
Q2 | '))
- {97: 49, 98: 50, 99: 51}
- {65: 49, 66: 50, 67: 51}
- {97: 49}
- 1
Q3 | '.replace('cd', '12'))
- ab12ef12
- abcdef12
- ab12efcd
- none of the mentioned
Q4 | '))
- abef
- 12
- error
- none of the mentioned
Q5 | '))
- ab1ef2
- abcefd
- ab1efd
- ab12ed2
Q6 | ))
- [‘abcdefcdghcd’]
- ‘abcdefcdghcd’
- error
- none of the mentioned
Q7 | ))
- [‘ab’, ‘ef’, ‘gh’]
- [‘ab’, ‘ef’, ‘gh’, ”]
- (‘ab’, ‘ef’, ‘gh’)
- (‘ab’, ‘ef’, ‘gh’, ”)
Q8 | ))
- [‘ab’, ‘ef’, ‘ghcd’]
- [‘ab’, ‘efcdghcd’]
- [‘abcdef’, ‘ghcd’]
- none of the mentioned
Q9 | : 100}))
- bcde
- abcd
- error
- none of the mentioned
Q10 | ))
- 000ab
- 00ab0
- 0ab00
- ab000
Q11 | '.zfill(5))
- 00+99
- 00099
- +0099
- +++99
Q12 | ,4,0,6])
- error
- true
- false
Q13 | 5676,2)?
- 4.5
- 4.6
- 4.57
- 4.56
Q14 | >8, 4>2, 1>2])
- error
- true
- false d) 4>2
Q15 | ,4,6) sum([1,2,3])
- error, 6
- 12, error c) 12, 6
- d) error, error
Q16 | ,0,4.2)
- true
- false
- error
Q17 | ,-4), 2,7)
- 2
- false
- -3
- -4
Q18 | +2j)
- error
- 1
- 2j
- 1+2j
Q19 | What is the output of the function complex()?
- 0j
- 0+0j
- error
Q20 | The function divmod(a,b), where both ‘a’ and ‘b’ are integers is evaluated as:
- (a%b, a//b)
- (a//b, a%b)
- (a//b, a*b)
- (a/b, a%b)
Q21 | The function complex(‘2-3j’) is valid but the function complex(‘2 – 3j’) is invalid.
- true
- false
Q22 | eval('x^2')
- error
- 1
- 9
- 6
Q23 | Which of the following functions does not necessarily accept only iterables as arguments?
- enumerate()
- all()
- chr()
- max()
Q24 | Which of the following functions accepts only integers as arguments?
- ord()
- min()
- chr()
- any()
Q25 | Suppose there is a list such that: l=[2,3,4]. If we want to print this list in reverse order, which of the following methods should be used?
- reverse(l)
- list(reverse[(l)])
- reversed(l)
- list(reversed(l))