Answer following questions for code given below: (1 pt) Id…
Answer following questions for code given below: (1 pt) Identify and explain the logical flaw in the if condition. (1 pt) Give an example input where the output is incorrect due to this flaw. (1 pt) Rewrite the condition so the logic correctly requires the user to be over 18 and have a ticket (either ‘y’ or ‘Y’). (2 pts) Explain how operator precedence affects the result in the original code.
Read Details