еучн
еучн
еучн
a. {{ 2 + 2 }}
b. { 2 + 2 }
c. (( 2+ 2 ))
d. {(2+ 2)}
a. Injector
b. Service
c. Injectable
d. Component
a. interpolation
b. property binding
c. event binding
d. Use a service
Test 1
6. Which of the following directive allows to use form?
a. ng-app
b. ng-form
c. ng-controller
d. ng-binf
d. Use a service
a. Dependency injection
b. Legacy
c. Polymorphism
b. It links a route to a service by matching the assigned string to a service class name
c. It links a route with data by matching the assigned string to a property name
10. What command will create a new Angular app with a root routing module
a. ng generate my-dream-app
a. Property Binding
Test 2
b. Interpolation Binding
c. Two-way binding
d. Directive Binding
a. Event Emitter
b. rxjs operator
c. promises
d. Data binding
d. Get, Post
c. Both
a. ngOnChanges
b. ngViewStart
Test 3
c. ngOnInit
a. @angular/core
b. @angular/router
c. Both
18. What is the decorator user for configuring your module class?
a. @NgModule
b. @NgApp
c. Both
a. synchronous
b. asynchronous
d. None of above
20. Which of the following will map the name of an input parameter “userData” to a field
named “users”?
a. @Input(’userData’)users
d. @Input(’users’) userData
a. MVC
b. MVVM
Test 4
c. MVT
d. MVP
a. Django
c. virtualenv
d. pip
a. VIEW
b. GET
c. HEAD
d. POST
25. Which of the following is the Client Error Category in HTTP response status codes a. 2xx
b. 3xx
c. 4xx
d. 5xx
a. List
b. Dictionary
Test 5
c. Tuple
d. Set
a. 7
b. 2
c. 4
d. 1
b. -
c. *
29. Which of the following statements is used to create an empty set in Python? a. ()
b. []
c. {}
d. set()
a. list1.addEnd(5)
b. list1.addLast(5)
c. list1.append(5)
d. list1.add(5)
31. Which layer in Django architecture will be called first when new request is received?
a. URLs
b. Views
c. Models
d. Middlewares
Test 6
32. What happens if MyObject.objects.get() is called with parameters that do not match an
existing item in the database?
33. Which of the following commands make the changes in models persistent in the database?
name = models.CharField(max_length=255)
class Product(models.Model):
a. category.product_set
b. category.products
c. category.get_products
d. category.retrieve_products
Test 7
36. In Django how would you retrieve all the ‘User’ records from the given database, where
username like ‘kbtu’?
a. User.objects.filter(username__like=’kbtu’)
b. User.objects.filter(username__contains=’kbtu’)
c. User.objects.filter(username__similar=’kbtu’)
d. User.objects.filter(username__includes=’kbtu’)
c. It will return the name of the post when Post object is printed
38. How to add default sorting by name in descending order to the Product model?
a. order_by = ‘name’
b. sort_by = ‘name’
c. sorting = ‘name’
d. ordering = ‘name’
39. How to filter Products (from previous question) in database, where name of the Products
belongs to one of the values from the python list?
Test 8
a. Product.objects.filter(name=[’Pepsi’, ‘Fanta’, ‘Cola’])
40. Which lines in code below shows the example of nested serializer?
a. 9, 17,25
b. 13, 21
c. 8, 16, 24,
d. 6, 12, 20
Test 9