Coding

Pyhton Coding Test

0%

Time Limit 10 minutes

Maximum Allowed Time Is over

Your Paper Successfully Sent.


coding

Python

1 / 50

Which function is used to display output in Python?

2 / 50

How do you call a function my_function in Python?

3 / 50

What will range(5) produce?

4 / 50

How do you add an element to a list?

5 / 50

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

6 / 50

How do you start a comment in Python?

7 / 50

How do you split a string into a list?

8 / 50

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

9 / 50

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

10 / 50

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

11 / 50

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

12 / 50

How do you check if a list is empty?

13 / 50

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

14 / 50

What is the output of bool(0)?

15 / 50

How do you get the ASCII value of a character?

16 / 50

What is a dictionary in Python?

17 / 50

How do you create a lambda function in Python?

18 / 50

What does str(123) return?

19 / 50

What is the result of not True?

20 / 50

What is the result of "apple" * 2?

21 / 50

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

22 / 50

Which method is used to get a value from a dictionary by key?

23 / 50

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

24 / 50

What keyword is used to define a loop in Python?

25 / 50

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

26 / 50

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

27 / 50

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

28 / 50

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

29 / 50

How do you exit a program with a status code?

30 / 50

What is the output of bool(None)?

31 / 50

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

32 / 50

How do you get the length of a list?

33 / 50

What is the output of bool([])?

34 / 50

How do you terminate a program in Python?

35 / 50

How do you concatenate two strings?

36 / 50

How do you open a file in write mode?

37 / 50

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

38 / 50

How do you get the remainder of a division?

39 / 50

How do you iterate over dictionary keys?

40 / 50

How do you define a function in Python?

41 / 50

How do you create a set in Python?

42 / 50

What does type([]) return?

43 / 50

What does break do in a loop?

44 / 50

Which operator is used to find the remainder of division?

45 / 50

What is the result of "Python".startswith("Py")?

46 / 50

What does isinstance(x, int) check?

47 / 50

How do you convert a string to an integer?

48 / 50

How do you round a number to two decimal places?

49 / 50

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

50 / 50

How do you convert a list into a set?