Difficulty | Low | Medium | High |
---|

A. Monte Python B. Guido Van Rossum C. Larry Wall D. David H. Hansson

A. Object-oriented B. Interactive C. Interpreted D. Statically typed

A. type() B. dtype() C. dir() D. help()

A. type() B. dtype() C. dir() D. help()

A. def B. while C. print D. elif

A. import B. include C. inherit D. install

A. abc123 B. _abc123 C. abc_123 D. 123_abc

A. x = -19.8 B. x = 1+2j C. x, y = 1, 2 D. x, y, z = 1

A. "hello" == 'hello' B. 'a' == 'A' C. 5 in [3, 4, 5] D. 'a' not in "AEIOU"

A. var = "hello"; B. var = "hello " + "world" C. var = 'I can't learn python' D. a = 1; b = 2

>>> practiceQuestion(2, 4) 6 >>> practiceQuestion(-2, 1.5) -0.5 >>> practiceQuestion(1+2j, 3+4j) (4+6j)

>>> practiceQuestion(30) 900

>>> practiceQuestion(67, 1.67) 24.02

>>> practiceQuestio(28.0) 82.40

Hint: import math; math.sqrt() >>> practiceQuestion(3, 4) 5.0

Hint: import math; math.pi

>>> practiceQuestion(3) 14.14

>>> practiceQuestion([1, 6, 3, 4, 5]) (6, 1, 19)

>>> practiceQuestion('A') 65 >>> practiceQuestion('a') 97

>>> practiceQuestion(1, 3, 2) # in the order of (a, b, c) 1 >>> practiceQuestion(1, 4, 4) 0 >>> practiceQuestion(1, 2, 3) -8

>>> practiceQuestion(1, 1, 4, 5) # in the order x1, y1, x2, y2 5.0

>>> practiceQuestion(20) True >>> practiceQuestion(-2) False >>> practiceQuestion(3) False

>>> practiceQuestion(21) True >>> practiceQuestion(22) True >>> practiceQuestion(23) False

>>> practiceQuestion(120) True >>> practiceQuestion(123) False >>> practiceQuestion(200) False

>>> practiceQuestion(17) True >>> practiceQuestion(9) False >>> practiceQuestion(-2) False

>>> practiceQuestion(2, 2, 2) True >>> practiceQuestion(-3, -3, -3) False >>> practiceQuestion(2, 3, 2) False

>>> practiceQuestion(2, 2, 1) False >>> practiceQuestion(-3, 1, -3) False >>> practiceQuestion(2, 3, 2) True

>>> practiceQuestion(2, 2, 2) False >>> practiceQuestion(3, 4, 5) True >>> practiceQuestion(2, 3, 2) False

>>> practiceQuestion(6) Fizz >>> practiceQuestion(15) FizzBuzz >>> practiceQuestion(7) 7

D > 0: 2 real roots; D = 0: 1 real root; D < 0: 2 complex roots >>> practiceQuestion(1, 2, 3) 'This equation has 2 complex roots.' >>> practiceQuestion(1, 3, 2) 'This equation has 2 real roots.' >>> practiceQuestion(1, 4, 4) 'This equation has 1 real root.'

>>> practiceQuestion('1619') '4:19 pm' >>> practiceQuestion('1200') '12:00 pm' >>> practiceQuestion('1020') '10:20 am'

>>> practiceQuestion('Apple') 'Ae'

>>> practiceQuestion([234,52,345,34,53]) [234, 52, 34]

>>> practiceQuestion([234,52,345,34,53]) 2 4

>>> practiceQuestion("Apple") ppl

>>> practiceQuestion('school') True >>> practiceQuestion('Apple') False

>>> practiceQuestion(17) Prime >>> practiceQuestion(-2) Non-prime

>>> practiceQuestion([1, 20, 300, 4005]) 10

>>> practiceQuestion('abc12ed') True >>> practiceQuestion('abcd') False >>> practiceQuestion('1234') False

>>> practiceQuestion(2, 7) [2, 3, 4, 5, 6, 7]

>>> Enter choice: Y hello >>> Enter choice: N

Enter list: [1, 2, 3] Enter value: 100 [100, 1, 2, 3]

>>> practiceQuestion([]) [] >>> practiceQuestion([1]) [] >>> practiceQuestion([1, 2, 3, 4]) [2, 3]

>>> practiceQuestion([]) 0 >>> practiceQuestion([17]) 17 >>> practiceQuestion([1, 2, 3, 4]) 5

>>> practiceQuestion([2, 45, 56, 67, 69, 12, 13, 15]) [2, 56, 12]

>>> practiceQuestion([1, 2, 7, 3], [4, 3, 7]) [3, 7]

>>> practiceQuestion(['i', 'SOLVED', 'PYthon', 'practice', 'QUEStions']) I solved python practice questions

>>> practiceQuestion([34, 12, 45]) [45, 34, 12]

Enter a list: [1, 2, 3, 4, 5] 15

>>> practiceQuestion(Enter a list: [32,52,35,234,5,2345,234,5234,2]) 5234 2

>>> practiceQuestion([1, 2, 3, 4], [3, 4, 6, 5]) [1, 2, 5, 6]