Online Test

1). What is the output of print(type(42))??

2). What is the correct syntax to create a function in Python??

3). Which of the following is used to insert comments in Python??

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

5). How do you create a list in Python??

6). What is the output of print("Hello"[0])??

7). Which of the following methods can be used to add an element to a list??

8). How do you check if a is equal to b in Python??

9). What is the output of print(7//2)??

10). Which keyword is used to define a class in Python??

11). What will be the output of len([1, 2, 3, 4])??

12). Which of the following is not a valid variable name in Python??

13). What is the output of print(2*3 == 6)??

14). Which function is used to convert a string into an integer??

15). How do you create an empty set in Python??

16). What will be the output of print(4 % 2)??

17). Which of the following is a mutable data type in Python??

18). How do you declare a global variable inside a function??

19). What is the correct syntax to import the math module??

20). Which operator is used to raise a number to a power??

21). How do you get the number of elements in a list??

22). What is the output of print(10 > 9)??

23). Which of the following is not a keyword in Python??

24). How do you start a while loop in Python??

25). What will be the output of print("Python"[::-1])??

26). How do you handle exceptions in Python??

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

28). Which of the following is a correct way to create a dictionary??

29). Which of the following is a correct syntax to check if an element exists in a list??

30). What will be the output of print(2 + 3 * 4)??

Test Results