Answer:
This will match the name Aaron
Explanation:
Using square brackets around a range indicates that a single character within the range of the brackets can be match.
In something like the given example
WHERE name LIKE "A[a-n]"
It will match all names that start with a capital A, which is immediately followed by a lowercase a through n.
Answer:
See the code snippet in the explanation section
Explanation:
import java.util.Scanner;
public class Question {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter first string: ");
String s1 = scan.nextLine();
System.out.println("Enter second string: ");
String s2 = scan.nextLine();
concatenateString(s1, s2);
}
public static void concatenateString(String firstString, String secondString){
int stringLength = firstString.length() - 1;
String s3 = "";
if (firstString.length() != secondString.length()){
System.out.println("String do not have equal length");
} else {
for(int i = stringLength; i >= 0; i--){
s3 += String.valueOf(firstString.charAt(i)).concat(String.valueOf(secondString.charAt(i)));
}
System.out.println(s3);
}
}
}
<span>I would advise her to press the fn keyboard key
along with the function key with a monitor connected on it. She should ensure
that she has the correct cable to connect the laptop to the projector. Most
laptops require a manual switch by pressing these combination keys but for
some, they will automatically detect the external display and switch to video
output</span>
Answer:
Here is the Python program:
COOKIES_PER_BAG = 40 #sets constant value for bag of cookies
SERVINGS_PER_BAG = 10 #sets constant value for serving in bag
CALORIES_PER_SERVING = 300 #sets constant value servings per bag
cookies = int(input("How many cookies did you eat? ")) #prompts user to input how many cookies he or she ate
totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG)); #computes total calories consumed by user
print("Total calories consumed:",totalCalories) #displays the computed value of totalCalories consumed
Explanation:
The algorithm is:
- Start
- Declare constants COOKIES_PER_BAG, SERVINGS_PER_BAG and CALORIES_PER_SERVING
- Set COOKIES_PER_BAG to 40
- Set SERVINGS_PER_BAG to 10
- Set CALORIES_PER_SERVING to 300
- Input cookies
- Calculate totalCalories: totalCalories ← cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG))
- Display totalCalories
I will explain the program with an example:
Lets say user enters 5 as cookies he or she ate so
cookies = 5
Now total calories are computed as:
totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG));
This becomes:
totalCalories = 5 * (300/40/10)
totalCalories = 5 * (300/4)
totalCalories = 5 * 75
totalCalories = 375
The screenshot of program along with its output is attached.
I guess the answer in the blank is Bridge.
A bridge is a device that provides a connection between two LANs that use the same protocol, or it can separate them into two sections.