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 purpose of the pass statement?

2 / 50

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

3 / 50

What is the result of 10 // 3?

4 / 50

How do you check if a string contains only numbers?

5 / 50

What is the result of float(10)?

6 / 50

How do you get the ASCII value of a character?

7 / 50

How do you start a comment in Python?

8 / 50

What is the result of 3 ** 2 in Python?

9 / 50

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

10 / 50

How do you reverse a list in Python?

11 / 50

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

12 / 50

What is the output of 5 % 2?

13 / 50

How do you sort a list in descending order?

14 / 50

Which keyword is used to check for membership in a list?

15 / 50

How do you remove duplicates from a list?

16 / 50

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

17 / 50

Which keyword is used to import all contents of a module?

18 / 50

How do you convert a string to an integer?

19 / 50

What is the purpose of the return keyword?

20 / 50

What does type([]) return?

21 / 50

How do you create a set in Python?

22 / 50

What is the correct file extension for Python files?

23 / 50

What is the result of 10 != 5?

24 / 50

How do you concatenate two strings?

25 / 50

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

26 / 50

What is the result of "apple".replace("a", "o")?

27 / 50

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

28 / 50

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

29 / 50

How do you get the first character of a string?

30 / 50

What is the result of 3 < 2 and 2 < 4?

31 / 50

What does isinstance("Python", str) return?

32 / 50

Which operator is used for equality comparison?

33 / 50

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

34 / 50

Which keyword is used to check a condition in Python?

35 / 50

How do you remove the last item from a list?

36 / 50

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

37 / 50

How do you iterate over dictionary keys?

38 / 50

How do you sort a dictionary by its keys?

39 / 50

What is the output of 10 == 10?

40 / 50

How do you check if a list is empty?

41 / 50

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

42 / 50

How do you handle exceptions in Python?

43 / 50

What is the result of not True?

44 / 50

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

45 / 50

How do you convert a string to lowercase?

46 / 50

How do you swap two variables in Python?

47 / 50

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

48 / 50

What does is compare in Python?

49 / 50

What is the output of "Hello" + "World"?

50 / 50

How do you create an infinite loop in Python?