Quiz Space

Modern Application Development II · End Term · 3 Sept 2023 · May 2023 term · Set QPF1-S1

Question 23: Consider the below Vue application with markup file “ind…

Question 23

+4.5 marksOne correct option

Consider the below Vue application with markup file “index.html” and javascript file “app.js”.

index.html:

html
<div id="app"></div>

app.js:

javascript
new Vue({
el: ‘#app’,
template: `<div>
Enter a point: <input v-model='point' />
<div id='content'>{{isOnCircle?"On the circle":"Not on the circle"}}</div>
</div>`,
data: {
point: null,
},
computed: {
isOnCircle() {
if (!this.point) {
return false
}
const [x, y] = this.point.split(',')
return x ** 2 + y ** 2 == 25
},
},
})

If the application is running on “http://localhost:8080”. What will be rendered by the browser in div with id “content” when user enters “3,4” in the input box?

  1. A

    On the circle

  2. B

    Not on the circle

  3. C

    true

  4. D

    False

Show answer

Correct answer

  • A

    On the circle

Question 23 of 32 in the IIT Madras BS Modern Application Development II (MAD 2) End Term paper sat on 3 Sept 2023, in the May 2023 term (IIT M FOUNDATION ET1 EXAM QPF1 S1 03 Sep). It carries 4.5 marks.

This question was also asked in

More questions from this paper

  1. Q1Consider the below HTML document. index.html: Suppose you open the “index.html” file in a browser, and click on the tab…
  2. Q2Consider the below HTML document. index.html: Suppose you open the “index.html” file in a browser, and click on the tab…
  3. Q3Consider the following JavaScript program, and predict the output if executed.
  4. Q4Match the Vue directives / constructs with their function.
  5. Q5Consider the below Vue application with markup file “index.html” and javascript file “app.js”. index.html: app.js: Supp…
  6. Q6Consider the below Vue application with markup file “index.html” and javascript file “app.js”. index.html: app.js: Supp…
  7. Q7Consider the below javascript program, and predict the output, if executed.
  8. Q8Consider the following flask application. app.py: Suppose the application is running on “http://localhost:5000”. If the…
  9. Q9What will be the output of the following javascript code.
  10. Q10Consider the below Vue application with markup file “index.html” and javascript file “app.js”. index.html: app.js: Supp…
  11. Q11Consider the Vue application
  12. Q12Which of the following is/are example(s) of ephemeral state?
  13. Q13Which of the following statement(s) is/are false in general?
  14. Q14Which of the following statement(s) is/are correct regarding the execution context in JavaScript?
  15. Q15Which of the following statements is/are correct regarding the prototype in javascript?
  16. Q16Which of the following statements is/are correct?
  17. Q17Which of the following statements is/are true regarding the celery in python?
  18. Q18Which of the following statements are true regarding async and await?
  19. Q19Which of the following statements is true regarding HTTP and fetch API?
  20. Q20Consider the following Vue application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppo…
  21. Q21Consider the below flask app, and an HTML file named “index.html”. app.py: index.html: Suppose you open the “index.html…
  22. Q22Consider the following flask application. app.py: Suppose the application is running on “http://localhost:5000”. If the…
  23. Q24Consider the below Vue application with markup file “index.html” and javascript file “app.js”.
  24. Q25Consider the Vue application
  25. Q26Consider the below Vue component and a Vuex store implementation. You are supposed to invoke the mutation function “upd…
  26. Q27Consider the given 2 implementations. Approach 1: driver code: celery job: Approach 2: driver code: celery job: Suppose…
  27. Q28Which of the following statement(s) is/are false regarding flask_caching and caching in general?
  28. Q29Which of the following statements is/are true?
  29. Q30Figure question
  30. Q31Which of the following statement(s) is/are true regarding short polling?
  31. Q32Which of the following statements is/are true in context of lighthouse?