Coding

Pyhton Coding Test

0%

Time Limit 10 minutes

Maximum Allowed Time Is over

Your Paper Successfully Sent.


coding

Python

1 / 50

How do you import a module in Python?

2 / 50

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

3 / 50

What is the result of int(5.9)?

4 / 50

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

5 / 50

How do you handle exceptions in Python?

6 / 50

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

7 / 50

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

8 / 50

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

9 / 50

What is the correct file extension for Python files?

10 / 50

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

11 / 50

What is the result of "abc".upper()?

12 / 50

How do you raise a number to a power?

13 / 50

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

14 / 50

How do you iterate over dictionary keys?

15 / 50

How do you define a function in Python?

16 / 50

What does is compare in Python?

17 / 50

How do you delete a key-value pair in a dictionary?

18 / 50

What is the result of 3 > 1 and 4 > 5?

19 / 50

How do you exit a program with a status code?

20 / 50

What is the output of bool(None)?

21 / 50

How do you concatenate two strings?

22 / 50

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

23 / 50

What is the result of len("Python")?

24 / 50

How do you call a function my_function in Python?

25 / 50

What is the output of "hello".count("l")?

26 / 50

How do you start a function with optional arguments?

27 / 50

What is the result of not True?

28 / 50

What is the purpose of the return keyword?

29 / 50

How do you round a number to two decimal places?

30 / 50

What keyword is used to define a loop in Python?

31 / 50

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

32 / 50

How do you define a constant in Python?

33 / 50

What is the output of "abc".capitalize()?

34 / 50

How do you create a dictionary in Python?

35 / 50

Which operator is used for equality comparison?

36 / 50

What is the result of "apple" * 2?

37 / 50

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

38 / 50

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

39 / 50

What is the output of bool(0)?

40 / 50

What is the result of "Python" * 2?

41 / 50

What does int("10") return?

42 / 50

How do you create a set in Python?

43 / 50

What is the result of range(3)?

44 / 50

How do you open a file for reading in Python?

45 / 50

What is the result of bin(10)?

46 / 50

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

47 / 50

What is the result of 10 // 3?

48 / 50

How do you swap two variables in Python?

49 / 50

What is the output of print(3 == 3.0)?

50 / 50

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