The document contains four separate code snippets that prompt the user for input and provide output based on conditions. The first snippet compares two numbers to determine the larger one, the second checks if a number is even or odd, the third assesses voting eligibility based on age, and the fourth identifies whether a number is negative, zero, or positive. Each snippet uses simple conditional statements to deliver the results.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
9 views
Worksheet 2 Answers
The document contains four separate code snippets that prompt the user for input and provide output based on conditions. The first snippet compares two numbers to determine the larger one, the second checks if a number is even or odd, the third assesses voting eligibility based on age, and the fourth identifies whether a number is negative, zero, or positive. Each snippet uses simple conditional statements to deliver the results.