Seminar 1

Quiz: Data Types in Python

Let’s test your understanding of Python data types!

  1. What is the output of the following code?

    a = [1, 2, 3]
    b = (1, 2, 3)
    print(type(a), type(b))
  2. Which of the following is mutable?

  3. What will be the output of this code?

    my_dict = {'a': 1, 'b': 2, 'c': 3}
    print(my_dict['b'])
  4. How do you create an empty set in Python?

  5. What is the result of 3 + 4.0?

  1. <class 'list'> <class 'tuple'>
  2. List
  3. 2
  4. set()
  5. 7.0