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 min([3, 1, 2])?

2 / 50

What is the result of "apple".find("z")?

3 / 50

What is the output of 10 == 10?

4 / 50

What is the result of range(3)?

5 / 50

How do you start a comment in Python?

6 / 50

How do you check the type of a variable?

7 / 50

What is the result of "Python".find("o")?

8 / 50

What is the output of bool(None)?

9 / 50

How do you open a file for reading in Python?

10 / 50

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

11 / 50

What is the default value of end in a print() function?

12 / 50

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

13 / 50

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

14 / 50

How do you sort a list in descending order?

15 / 50

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

16 / 50

How do you sort a dictionary by its keys?

17 / 50

How do you exit a program with a status code?

18 / 50

Which Python keyword is used to handle exceptions?

19 / 50

How do you handle exceptions in Python?

20 / 50

What does the pop() method do in a list?

21 / 50

How do you define a constant in Python?

22 / 50

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

23 / 50

How do you declare a variable in Python?

24 / 50

What is the output of list("hello")?

25 / 50

How do you create a single-line string in Python?

26 / 50

How do you write a multi-line string in Python?

27 / 50

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

28 / 50

How do you round 2.675 to two decimal places?

29 / 50

What does continue do in a loop?

30 / 50

How do you add an element to a list?

31 / 50

What does break do in a loop?

32 / 50

What is the correct way to create a list in Python?

33 / 50

What does str(123) return?

34 / 50

How do you open a file in write mode?

35 / 50

How do you check if a key exists in a dictionary?

36 / 50

What is the output of min(10, 20, 5)?

37 / 50

How do you check if a string contains only numbers?

38 / 50

What is the output of len({1, 2, 2, 3})?

39 / 50

What is the output of 2 * '3' in Python?

40 / 50

How do you convert a string to an integer?

41 / 50

What is the result of "Python" * 2?

42 / 50

How do you create an empty dictionary?

43 / 50

What is the result of bool([1, 2])?

44 / 50

How do you convert a list to a set in Python?

45 / 50

What will range(5) produce?

46 / 50

What is the result of 10 // 3?

47 / 50

How do you iterate over dictionary keys?

48 / 50

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

49 / 50

How do you start a function with optional arguments?

50 / 50

How do you convert a string to lowercase?