Coding

Pyhton Coding Test

0%

Time Limit 10 minutes

Maximum Allowed Time Is over

Your Paper Successfully Sent.


coding

Python

1 / 50

What is the result of bool("False")?

2 / 50

What is the result of 3 > 5 or 5 > 2?

3 / 50

How do you open a file for reading in Python?

4 / 50

What is the correct file extension for Python files?

5 / 50

What is the output of [1, 2, 3][1]?

6 / 50

How do you access an element by key in a dictionary?

7 / 50

What is the result of list(range(3, 6))?

8 / 50

How do you get the absolute value of a number?

9 / 50

What is the purpose of the pass statement?

10 / 50

How do you create an infinite loop in Python?

11 / 50

What is the output of type("123")?

12 / 50

How do you swap two variables in Python?

13 / 50

What is the keyword used to define a class in Python?

14 / 50

How do you get the length of a dictionary?

15 / 50

How do you remove whitespace from the beginning and end of a string?

16 / 50

How do you handle exceptions in Python?

17 / 50

How do you get the ASCII value of a character?

18 / 50

What is the result of int(5.9)?

19 / 50

What does continue do in a loop?

20 / 50

How do you exit a program with a status code?

21 / 50

What does type(10.5) return?

22 / 50

What is the result of range(3)?

23 / 50

What is the result of "Python" * 2?

24 / 50

Which module is used for mathematical operations?

25 / 50

Which method adds an element to the end of a list?

26 / 50

How do you terminate a program in Python?

27 / 50

How do you get the first character of a string?

28 / 50

How do you get the keys of a dictionary?

29 / 50

How do you declare a variable in Python?

30 / 50

What does break do in a loop?

31 / 50

What is the result of bin(10)?

32 / 50

What is the output of not(True)?

33 / 50

How do you handle exceptions in Python?

34 / 50

What is the purpose of the elif statement?

35 / 50

What is the result of 5 * 2 == 10?

36 / 50

What is the output of print(type(10))?

37 / 50

How do you iterate over a range in steps of 2?

38 / 50

What is the result of not True?

39 / 50

What is the result of max([1, 5, 3])?

40 / 50

How do you check the type of a variable?

41 / 50

How do you access the value of a key in a dictionary?

42 / 50

What is the result of [1, 2, 3] + [4, 5]?

43 / 50

What is the result of "Python"[::-1]?

44 / 50

What does type([]) return?

45 / 50

How do you get the length of a list?

46 / 50

How do you iterate over dictionary keys?

47 / 50

What is the output of print(2 + 3)?

48 / 50

What is the result of "hello".title()?

49 / 50

How do you convert a string to an integer?

50 / 50

What is the result of [1, 2, 3] * 2?