Q17.`A` is a positive integer that represents the age. Consider the following snippet of code:
```
if 0 < A <= 14:
print('child')
elif 14 < A <= 24:
print('youth')
elif 24 < A <= 64:
print('adult')
else:
print('senior')
```
Two snippets of code are equivalent if they produce the same output for any given input. Select all snippets of code that are equivalent to the code given above.
Save
Check
Details
Q17
16 Oct 2022
Q17.`A` is a positive integer that represents the age. Consider the following snippet of code:
```
if 0 < A <= 14:
print('child')
elif 14 < A <= 24:
print('youth')
elif 24 < A <= 64:
print('adult')
else:
print('senior')
```
Two snippets of code are equivalent if they produce the same output for any given input. Select all snippets of code that are equivalent to the code given above.