Ruby - Control Flow
Write a Ruby if-elsif-else structure that prints "Child" if age is less than 13, "Teen" if age is between 13 and 19 inclusive, and "Adult" otherwise. Which code is correct?
Write a Ruby if-elsif-else structure that prints "Child" if age is less than 13, "Teen" if age is between 13 and 19 inclusive, and "Adult" otherwise. Which code is correct?
age >= 13 && age <= 19 for Teen.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions