0% found this document useful (0 votes)
95 views

CSE3002-Internet and Web Programming: Name: Shokan V REGNO: 18BCB0085 SLOT: L55+L56 Faculty: Senthilkumar N

This document contains 12 coding challenges involving tasks like accepting user input, performing calculations, validating data, and manipulating the DOM. The challenges cover concepts like functions, conditionals, loops, regular expressions, and jQuery selectors. Students are asked to write code to solve each problem and display the output.

Uploaded by

SHOKAN v
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

CSE3002-Internet and Web Programming: Name: Shokan V REGNO: 18BCB0085 SLOT: L55+L56 Faculty: Senthilkumar N

This document contains 12 coding challenges involving tasks like accepting user input, performing calculations, validating data, and manipulating the DOM. The challenges cover concepts like functions, conditionals, loops, regular expressions, and jQuery selectors. Students are asked to write code to solve each problem and display the output.

Uploaded by

SHOKAN v
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

CSE3002- Internet and Web Programming

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:

3.Write a program that reads number of miles, cost of a gallon of gas,


and car gas consumption (miles per gallon) andthen determines the
cost of a specific trip. The output should be displayed using
document.writeln
CODE:
OUTPUT:

4.According to Wikipedia a happy number is defined by the following


process : "Starting with any positive integer, replace the number by the
sum of the squares of its digits, and repeat the process until the
number equals 1 (where it will stay), or it loops endlessly in a cycle
which does not include 1. Those numbers for which this process ends in
1 are happy numbers, while those that do not end in 1 are unhappy
numbers (or sad numbers).Write a JavaScript program to find and print
the first 5 happy numbers.
CODE:
OUTPUT:
5.Develop an Online Greetings Designer using Javascript and CSS. Add
options to
i)change the image
ii)Position the image (left, background, right)
iii)Edit text
iv)Change font size
v)Change font color
CODE:
OUTPUT:
6.A parking garage charges a $2.00 minimum fee to park for up to three
hours. The garage charges an additional $0.50 per hour for each hour
or part thereof in excess of three hours. The maximum charge for any
given 24-hour period is $10.00. Assume that no car parks for longer
than 24 hours at a time. Write a script that calculates and displays the
parking charges for each customer who parked a car in this garage
yesterday. You should input from the user the hours parked for each
customer. The program should display the charge for the current
customer and should calculate and display the running total of
yesterday's receipts. The program should use the function calculate-
Charges to determine the charge for each customer. Use a text input
field to obtain the input from the user.
CODE:

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:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy