Problem Solving And Python Programming Set 8
On This Page
This set of Problem Solving and Python Programming Multiple Choice Questions & Answers (MCQs) focuses on Problem Solving And Python Programming Set 8
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 | Which of the following functions is a built- in function in python?
- seed()
- sqrt()
- factorial()
- print()
Q13 | 576)
- 4.5
- 5
- 4 d) 4.6
Q14 | ,4,0,6])
- error
- true
- false
Q15 | 5676,2)?
- 4.5
- 4.6
- 4.57
- 4.56
Q16 | >8, 4>2, 1>2])
- error
- true
- false d) 4>2
Q17 | ,4,6) sum([1,2,3])
- error, 6
- 12, error c) 12, 6
- d) error, error
Q18 | ,0,4.2)
- true
- false
- error
Q19 | ,-4), 2,7)
- 2
- false
- -3
- -4
Q20 | +2j)
- error
- 1
- 2j
- 1+2j
Q21 | What is the output of the function complex()?
- 0j
- 0+0j
- error
Q22 | 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)
Q23 | The function complex(‘2-3j’) is valid but the function complex(‘2 – 3j’) is invalid.
- true
- false
Q24 | , 3]))
- error
- [(1, 2), (2, 3)]
- [(0, 2), (1, 3)]
- [(2, 3)]
Q25 | ')
- error
- 1
- 9
- 6