Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 122 - CodePilot V5.0 C8
P. 122

    LAB LEARNING                                               21 st
                                                                                           Century   #Creativity
                                                                                            Skills  #Technology Literacy
                             1.  Create an HTML file with a button. When clicked, an external JavaScript file should display
                                an alert: “Button clicked!”.
                             2.  Write an HTML form that accepts an item’s price and discount percentage.
                                On submit, calculate and display the discounted price using JavaScript.

                             3.  Write  a JavaScript  function  to  store  and display the  user’s  name,  age  and
                                agreement status in the console.
                             4.  Write a JavaScript function to calculate area that takes length and width as arguments
                                and returns the area of the rectangle. Call it with sample values.

                                        CODE CHECK                                                Century   #Critical Thinking
                                                                                                   21 st
                                                                                                   Skills  #Technology Literacy
                         1.  A developer writes a JavaScript function to calculate the perimeter of a rectangle. What is the
                            perimeter if the length is 7 units and width is 5 units?

                                   (i)  12 units           (ii)  14 units          (iii)  24 units          (iv)  34 units
                         2.  Decrypt this message that was encoded with a Caesar Cipher to get the original text.
                            Caesar Cipher: Shift each letter three places backward.
                            Encrypted Text: ORJLFDO RSHUDWRU

                           JOB JUNCTION

                              People who are experts in JavaScript can pursue a career as JavaScript Developers, focusing on
                              creating interactive web applications.

                                                                                              21 st   #Collaboration
                                                                                             Century
                                                                                              Skills  #Leadership & Responsibility
                                Divide the class into two groups. Group 1 will focus on internal JavaScript and Group 2 on
                                external JavaScript. Each group will present their findings, comparing the advantages and
                               disadvantages and provide real-life examples of when each is preferred.

                       PEDAGOGY PATHWAYS

                        «   Discuss some more statements of JavaScript with the students.
                        «   Explain the features of JavaScript in detail to the students.

                      120
                            CodePilot (V5.0)-VIII

| 117 118 119 120 121 122 123 124 125 126 127 |