Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A movie theater has a normal ticket price of $12. for shows that start between 7

ID: 3853236 • Letter: A

Question

A movie theater has a normal ticket price of $12. for shows that start between 7pm and 1am , there is no discount. for shows that start at other times, there are special prices for the following age ranges: individuals whose age is 65 or over pay $9.50. Write vba function that gets the individual's ages from the worksheet and returns the ticket cost. Your function can get the current time of day in hours ( on a 24 hour clock) by a statement like timeHr= hour (Now). For example if the time was between 7pm and 7:59:59 pm the statement timeHr = Hour(Now) would return the value of 19.

Must Use an if-elseif-else-endif -structure

A movie theater has a normal ticket price of $12. For shows that start between 7 pm and 1 am, there no discount. For shows that start at other times, there are special prices for the following age ranges: individuals whose under 12 pay only $8; individuals, whose age is between 12 and 16 inclusive, pay only $10; individuals whose age is 65 or over pay $9.50. VBA function that gets the individual's age from the worksheet and retums the ticket i cost. Your function can get the current time of day in hours (on a 24 hour clock) by a statement like timeHr For example f the time was between 7 pm and 7:59:59 pm, the statement tmeHrs Hour(Now) would return a valua of You must Use an if -elseif- else -endif structure. Call m o Problem 3

Explanation / Answer

You can make sections of templates or scripts conditional by using IF instructions. A conditional section will be included only if a condition you specify is true. The ELSE IF instruction allows two or more conditions to be included in an IF instruction. The ELSE instruction establishes a final condition for an IF instruction, specifying that if all preceding conditions are false, the following information should be included. It must be the last item of the IF instruction.

Each IF instruction or expression must end with an END IF instruction. This instruction completes a section of conditional logic. HotDocs automatically creates an END IF paired with each IF instruction. These pairs can be nested, allowing you to test several conditions before applying a single effect.

For example, in the following script, HotDocs uses an IF instruction to insert a paragraph about vacation time—but only if the new employee qualifies for paid vacation:


«IF Vacation Days»In addition, «Employee Name» shall be allowed «Number of Vacation Days:ten» for vacation time. «Employee Name» shall also receive seven paid holidays, including New Year's Day, Memorial Day, Fourth of July, Labor Day, Thanksgiving (including the day after), and Christmas.«END IF»


More complex situations can also be handled using IF expressions. For example, in the following computation script, a single paragraph in a template may change depending on how close a project is to completion. Using the IF, ELSE IF, and ELSE instructions, the correct paragraph can be inserted:


Note: You can use IF expressions anywhere. Operators such as AND and OR can link multiple conditions, giving the user greater control over the interview. However, creating complicated IF instructions directly in the template can make the assembly process sluggish. Consider using Computation variables or INSERT instructions instead.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote