Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add a heading. output paragragh, and button to the HTML . paget. Create a hunctice for ifie beition to call that uses two prompts to
Add a heading. output paragragh, and button to the HTML paget. Create a hunctice for ifie beition to call that uses two prompts to ask at user how olis they ae in years and the title of the movie they want to see. If eiftier
If either vatue in irvalid, display a message in the output poragrapti explaining of
The number is invalid if is not a poskive mamber use your function from part
The title is invalid if if's length is
If both values are valid, calculate the price of the thchet as follows.
o The base price of the ticket is based on the lingith of the stie. The mosie costs per character in the title. The minimum buse price is $ and the maximum os $ Just cteck the inngth af the string, spaces, punctuation, numbers, elc, are al indude in the length if the sitring a too lorig or too short, youll use the minimumtmaxmum price
o It the uset is younger thas or oider than they recetion a $ discourt it the base prica
Displiay one of the tollowing messages with the correct values based on the inpulfcalculations
Your did not enter a vald age You mist enter a positive number.
You od not emer a vals bitfe. Thet lille must have at least one chatacter
A regular toket for IT is
A discourit tikiel for it is
A reguiar tichel for Ghastbusters conis
A discount ticket for Ghoatbusters costn $
A reguar tickel kor Everyiting Everyature All Al Once is $
A difoccim bodel for Everyting Everyitere All Af Once is S
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started