Quiz Space

Modern Application Development II · End Term · 30 Apr 2023 · January 2023 term · Set QPD1-S2

Question 13: Consider the below application with markup “index.html” …

Question 13

+3 marksOne correct option

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

index.html:

html
<div id="app"></div>
<script
src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script
src="https://unpkg.com/vue-router@3.0.0/dist/vue-router.js"></script>
<script src="app.js" type="module"></script>

app.js:

javascript
const data = {
1: { totalRun: 1000, totalMatches: 20 },
2: { totalRun: 7000, totalMatches: 100 },
}
const NotFound = { template: `<div> Player Not Found</div>` }
const Profile = {
template: `<div>Run: {{stat.totalRun}}, Matches:
{{stat.totalMatches}}, Average: {{average}}</div>`,
data() {
return {
stat: data[this.$route.params.id],
}
},
computed: {
average() {
return this.stat.totalRun / this.stat.totalMatches
},
},
}
const router = new VueRouter({
routes: [
{ path: '/profile/:id', component: Profile },
{ path: '*', component: NotFound },
],
})
new Vue({
el: '#app',
template: '<div><router-view /></div>',
router,
})

Suppose the application is running on “http://127.0.0.1:8080”. What will be displayed for the URL “http://127.0.0.1:8080/#/profile/1”?

  1. A

    Player Not Found

  2. B

    Run: 1000, Matches: 20, Average: 50

  3. C

    Run: 7000, Matches: 100, Average: 70

  4. D

    None of these

Show answer

Correct answer

  • B

    Run: 1000, Matches: 20, Average: 50

Question 13 of 32 in the IIT Madras BS Modern Application Development II (MAD 2) End Term paper sat on 30 Apr 2023, in the January 2023 term (IIT M DIPLOMA ET1 EXAM QPD1 S2 30 Apr 2023). It carries 3 marks.

More questions from this paper

  1. Q1Which of the following statement(s) is/are false regarding javascript language?
  2. Q2Which of the following statement(s) is/are true about cookies and CORS?
  3. Q3Figure question
  4. Q4Which of the following statement(s) is/are false about pub/sub messaging?
  5. Q5Which of the following statement(s) is/are false?
  6. Q6Which of the following shows the correct output if the javascript program written below is executed?
  7. Q7Which of the following statements is true in the context of REST?
  8. Q8Which of the following shows the correct output if the javascript program written below is executed?
  9. Q9Which of the following statements is false regarding a message broker?
  10. Q10Which of the following statement(s) is incorrect regarding the prototype in JavaScript?
  11. Q11Consider the below application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppose the u…
  12. Q12Consider the below application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppose the a…
  13. Q14Consider the below application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppose the a…
  14. Q15Consider the below application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppose the a…
  15. Q16Consider the below application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppose the a…
  16. Q17Which of the following is/are not the correct ways to achieve the following.
  17. Q18Which of the following statement(s) is/are false regarding Vuex?
  18. Q19Which of the following statement(s) is/are false regarding forward and reverse proxy?
  19. Q20Suppose you are building an application which requires sending emails to all the users stored in the database at regula…
  20. Q21Which of the following statement(s) is/are correct regarding Vue.js framework?
  21. Q22Which of the following statements is false about VueJS framework?
  22. Q23Which of the following statements is false regarding webhooks?
  23. Q24Suppose an endpoint in your flask application triggers a celery task, which generates a CSV file named “data.csv” and s…
  24. Q25Consider the following Vue application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppo…
  25. Q26Consider the following javascript program, and predict the output if executed.
  26. Q27Consider the following Vue application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppo…
  27. Q28Which of the following shows the correct output if the javascript program written below is executed?
  28. Q29Consider the below application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppose you o…
  29. Q30Consider the below application with markup “index.html” and javascript file “app.js”. index.html: app.js: Suppose you o…
  30. Q31Consider the below flask application. app.py: If the Redis server is running on “localhost:6379”, and application is ru…
  31. Q32Consider the below flask application. app.py: If the Redis server is running on “localhost:6379”, and application is ru…