// C++ switch
// It can also be used for JAVA, C#
switch(age){
// here age will be sent by the function in which it is used
// case to check the age<2
case(age<2 && age>0):
// printing the line
cout<<"ineligible";
// case to check the age ==2
case(age==2):
// printing the line
cout<<"toddler";
// case to check 3-5
case(age>=3 && age<=5):
cout<<"early childhood";
// case to check 6-7
case(age==6 || age==7):
cout<<"young reader";
//case to check 8-10
case(age>=8 && age<=10):
cout<<"elementary";
// case to check 13
case(age==13):
cout<<"impossible";
//case tocheck 14-16
case(age>=14 && age<=16):
cout<<"high school";
// case to check 17 or 18
case(age==17 || age==18):
cout<<"scholar";
//case to check >18
case(age>18);
cout<<"ineligible";
// default case
default:
cout<<"Invalid age";
}
Read more on Brainly.com - brainly.com/question/12981906#readmore
The Continents were all joined into one land mass
Answer:
The answer to this question is given below in the explanation section.
Explanation:
First, we need to convert these hexadecimal numbers into decimal numbers, then we can easily identify which one is the lowest hexadecimal.
The hexadecimal numbers are F2, 81, 3C, and 39.
F2 = (F2)₁₆ = (15 × 16¹) + (2 × 16⁰) = (242)₁₀
81 = (81)₁₆ = (8 × 16¹) + (1 × 16⁰) = (129)₁₀
3C = (3C)₁₆ = (3 × 16¹) + (12 × 16⁰) = (60)₁₀
39 = (39)₁₆ = (3 × 16¹) + (9 × 16⁰) = (57)₁₀
The 39 is the lowest hexadecimal number among the given numbers.
Because 39 hex is equal to 57 decimal.
39 = (39)₁₆ = (3 × 16¹) + (9 × 16⁰) = (57)₁₀
Answer:
- def Lambda(strList):
- return list(filter(lambda s: (s.startswith("e")), strList))
-
- print(Lambda(["meaning", "cart", "engine", "egg"]))
Explanation:
The solution code is written in Python 3.
Lambda function is an anonymous function. It is a function without any name and it is started with keyword lambda. To write a lambda function to filter the string started with an 'e', we can write a lambda expression, s.startswith("e") that work on one input strList. If any word from strList started with letter "e", the word will be added into a list generated by filter function. At the end, the Lambda function will return the list of strings as output.
When we test the Lambda function using the sample string list (Line 4), we shall get ['engine', 'egg'] printed to terminal.