Microsoft Word - CSCI165_A3 1 CSCI 165 (FLEX) Assignment#3 In this assignment, you will develop a web page that asks the user to guess a secret number. The programming...

1 answer below »
Hi i attech the two files one instructions file please read it carefully and you have to do the assignment in the second attached html file make sure to read the instructions file carefully don’t do anything wrong


Microsoft Word - CSCI165_A3 1    CSCI 165 (FLEX) Assignment#3  In this assignment, you will develop a web page that asks the user to guess a secret number. The programming  logic part must be done using JavaScript.     Due:     Mar 22, 2020 (Monday morning) at 8 am  Submission:   Submit the following file to the link Assignment#3 Desc and Submission   index.html  (the Home page with an embedded JavaScript function)    Step 1:  Download the index.html from the course website.  In this lab, you only need to modify index.html.     Note: Since there is only one file, you don’t have to zip it when submitting your work. Don’t change  the file name of “index.html”.     Step 2:  Look at the following sample webpages to have some ideas about the requirements of this assignment.     Index.html (when it is launched in a browser)                Suppose your student number is 888789, the secret number [the last 3 digits] will be 789. The secret number  will be hard‐coded inside your JavaScript function.                                                 The page asks the user to enter a number  and then press the button to check if the  input number is the same as the hidden  secret number (Note: the secret number  MUST BE the last 3 digits of your student ID)  Suppose the secret number is 789. User  enters a number smaller than that. The  page will output a hint and asks the user  to enter a BIGGER number and try again.  Suppose the secret number is 789. User  enters a number bigger than that. The  page will output a hint and asks the user  to enter a SMALLER number and try again.  If the user input equals to the secret  number, the page will output a  “congratulation” message.   2    Step 3:  Since only a number between 1 and 999 (inclusively) is considered as valid. Any number outside that range or  any non‐numeric character will be considered as invalid. You need to add code to the JavaScript function to   avoid invalid inputs. Please look at the following scenarios for reference.                     Step 4:  Requirements:   Each student’s secret number is different. Your secret number is the last 3 digits of your student ID. (For  example, if your ID is 888789, the secret number will be 789. If your ID is 888012, the secret number will  be 12)    A partially completed index.html is provided. Read the comments to figure out the missing statements.    Your JavaScript function should also check if an input is a valid input. Any non‐numeric input (e.g. xyz) or  any number outside the range (e.g., ‐1, ‐10, 1000, 1001) are invalid inputs.   Hint: to check if an input is non‐numeric, you should use a built‐in function named isNaN(x) where x is  the input number (recall: a number entered to the text box must first be converted to number data type  using ParseInt)   User enters “‐5” which is outside the valid  range for inputs. The page outputs a warning  message when the button is clicked.  User enters “abc” which is not a valid,  numeric input. The page outputs a warning  message when the button is clicked.  Guess a Secret Number Guess my Secret Number ** written by [Student Name] Enter a number between (1 and 999) inclusively. Check Result
Answered Same DayMar 19, 2021

Answer To: Microsoft Word - CSCI165_A3 1 CSCI 165 (FLEX) Assignment#3...

Sayed Shad Ahmad answered on Mar 20 2021
124 Votes
index.html
    Guess my Secret Number ** written by Prabhjeet Kaur
    
        Enter a number between (1 and
999) inclusively.
        
        Check Result
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here