Answer:
Association rules are usually referred as the if-then statements which help in order to show probability of association and relationships in between data items that are embedded within large data sets in several kinds of databases. Association rule mining also tends to have a several number of applications and thus is widely used in order to uncover sales relation in transactional data.
Answer:
Which of these statements is true?
July 03 book Science up36 down8
A
Places on the same longitude have the same day length on any given day.
B
The local time will be same for all places on the same latitude.
C
At 00 longitude, at some time, it would be noon to the east and midnight to the west.
D
The maximum time difference between any two places will be just below 24 hours.
Explanation:
Answer:
public class num1 {
public static void main(String[] args) {
//Calling the method Calculate
calculate();
}
//Method Calculate
public static void calculate() {
Scanner in = new Scanner(System.in);
System.out.println("Enter five numbers greater than 0");
int sum =0;
for(int i =0; i<5; i++){
System.out.println("Enter the "+(i+1)+" number");
sum+=in.nextInt();
}
System.out.println("The sum of the five numbers is: "+sum);
}
}
Explanation:
- Two Methods are created in Java Programming Language
- The main method and the method calculate()
- The calculate method uses a for loop to request users to enter five numbers
- Every number entered is added to the sum initially set to 0
- The sum is printed at the end
- In the main method, calculate is called.
Answer:
- def getCharacterForward(char, key):
- charList = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-
- if(len(char) > 1):
- return None
- elif(not isinstance(key, int)):
- return -1
- else:
- index = charList.find(char)
- if(index + key <= 25):
- return charList[index + key]
- else:
- return charList[(index + key)% 26]
-
- print(getCharacterForward("C", 4))
- print(getCharacterForward("X", 4))
Explanation:
Firstly, define a charList that includes all uppercase alphabets (Line 2). We presume this program will only handle uppercase characters.
Follow the question requirement and define necessary input validation such as checking if the char is a single character (Line 4). We can do the validation by checking if the length of the char is more than 1, if so, this is not a single character and should return None (Line 5). Next, validate the key by using isinstance function to see if this is an integer. If this is not an integer return -1 (Line 6 - 7).
Otherwise, the program will proceed to find the index of char in the charList using find method (Line 9). Next, we can add the key to index and use the result value to get forwarded character from the charList and return it as output (Line 11).
However, we need to deal a situation that the char is found at close end of the charList and the forward key steps will be out of range of alphabet list. For example the char is X and the key is 4, the four steps forward will result in out of range error. To handle this situation, we can move the last two forward steps from the starting point of the charList. So X move forward 4 will become B. We can implement this logic by having index + key modulus by 26 (Line 13).
We can test the function will passing two sample set of arguments (Line 15 - 16) and we shall get the output as follows:
G
B
greatflombles or gr8flombles or go2flombles