User Icon

Clisto Agni

"Embrace challenges; they nurture growth."



back

Python Assessment - 2

60

Questions

11. Which of the following is a correct way to start a conditional statement in Python?

12. What will be the output of the following code: `if 3 > 2: print("True") else: print("False")`?

13. Which operator is used to compare two values?

14. How do you create a list in Python?

15. How do you access the first element of a list `myList` in Python?

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

17. Which method is used to add an element to a set in Python?

18. Which of the following collections allows duplicate elements?

19. What is the result of `5 % 2`?

20. Which of the following is used to create a dictionary in Python?