Django - Sample Interview Question (Junior Level)

Which of the following querysets will return the same results?

A:
Shop.objects.filter(field1=1, field2__gt=5)

B:
Shop.objects.exclude(field1__gt=1, field1__lt=1, field2__lte=5)

C:
Shop.objects.exclude(field1__gt=1).exclude(field1__lt=1).exclude(field2__lte=5)

  1. All of them
  2. None of them
  3. A and B
  4. A and C
Tests in Django for Juniors

Test Name Difficulty Time (minutes) No. of Questions
Django Online Test for Juniors Django Junior 20 10