CSE3002-Internet and Web Programming: Name: Shokan V REGNO: 18BCB0085 SLOT: L55+L56 Faculty: Senthilkumar N
CSE3002-Internet and Web Programming: Name: Shokan V REGNO: 18BCB0085 SLOT: L55+L56 Faculty: Senthilkumar N
NAME: SHOKAN V
REGNO: 18BCB0085
SLOT: L55+L56
FACULTY: SENTHILKUMAR N
CYCLE SHEET – 2
1.Write a script to take three numbers from the user and display the
greatest number out of three.
CODE:
OUTPUT:
2.Complete the following function called count that takes an array of
integers and the size of the array, and return the number of items in
the array that is greater than 13 and less than 29.
CODE:
OUTPUT:
OUTPUT:
7.Develop a word decoder challenge game using HTML, CSS and
JavaScript. Present the player with a set of scrambled word & hint and
challenge him to unscramble them. For each attempt randomly select a
word, refresh the browser window dynamically and display the
scrambled word in red. Once the player thinks the word has been
properly decoded, he clicks on the Check Answer button to see the
results. If the answer is correct, the player is notified via a success
message displayed in a popup dialog window or displays a failure
message.
CODE:
OUTPUT:
8.Develop a JavaScript program that will determine whether a
department-store customer has exceeded the credit limit on a charge
account. For each customer, the following facts are available:
i)Account number
ii)Balance at the beginning of the month
iii)Total of all items charged by this customer this month
iv)Total of all credits applied to this customer's account this month
v)Allowed credit limit
The program should input each of these facts from a prompt dialog as
an integer, calculate the new balance (= beginning balance + charges –
credits), display the new balance and determine whether the new
balance exceeds the customer's credit limit. For customers whose
credit limit is exceeded, the program should output HTML text that
displays the message “Credit limit exceeded.”
CODE:
OUTPUT:
9.Implement an online quiz application. The timer is set for each
question .If timer elapses the next question is automatically displayed
.Going back to previous question is disabled and going to next question
before time should also be possible. The app should display the results
of the user at the end of quiz.
CODE:
OUTPUT:
10.Create a script that uses regular expressions to validate credit card
numbers. Major credit card numbers must be in the following formats:
• American Express—Numbers start with 34 or 37 and consist of 15
digits.
• Diners Club—Numbers begin with 300 through 305, or 36 and 38
and consists of 14 digits.
• Discover—Numbers begin with 6011 or 65 and consist of 16 digits.
• JCB—Numbers beginning with 2131 or 1800 consist of 15 digits,
while numbers beginning with 35 consist of 16 digits.
• MasterCard—Numbers start with the numbers 51 through 55 and
consist of 16 digits.
• Visa—Numbers start with a 4; new cards consist of 16 digits and
old cards consist of 13 digits.
CODE:
OUTPUT:
11.Design a table in the format given below using HTML and Jquery
selectors. Apply different background for odd and even rows of the
table. Apply different CSS for table header using jquery selector.
CODE:
OUTPUT:
12.Design the following web page and write the J-query code to do the
following:
The desired behaviour of the above page is when the button is clicked,
all occurrences of the word Blue should be changed to the text
specified in the input field. Example -The input field currently has the
world Purple.
CODE:
OUTPUT: