Stealing someone else’s identity or identification
Answer:
- public class Square {
- public static boolean isPerfectSquare(int n){
- int sqrt_n = (int) Math.sqrt(n);
- if(sqrt_n * sqrt_n == n ){
- return true;
- }else{
- return false;
- }
- }
- }
Explanation:
Firstly, use sqrt method from Math package to calculate the square root of input n (Line 3). Cast the result to integer and assign it to sqrt_n variable.
Next, square the sqrt_n and check if it is equal to input n (Line 4). If so, return true, if not, return false (Line 4-8).
Answer: Supermarket bar code scanners and Voice-activated telephone menus are not instances of artificial intelligence
Explanation:
(a)Supermarket bar code scanners are only able to read the code however they are not able to perform any kind of machine learning techniques to be able to learn a sequence from the codes. As machine learning is a important part of artificial intelligence (AI) so they are not instances of AI. Similarly for Voice-activated telephone menus they could only display and cannot perform any intelligent task.
Web search engines and Internet routing algorithms are very dynamic and intelligent in processing and retrieving information to the end user.
So they are instances of AI.
Answer:
combined in color.
Explanation:
It's because the modern traffic signals are controlled by the computers, and they are programmed to display different signals for different times of day, night, days of week and holidays etc.
Answer:
The base case
Explanation:
Required
The part that determines the termination of a recursion
This part of a recursion is referred to as the base case.
Take for instance, the following:
<em>factorial(int n)
{
</em>
<em> if (n < = 1) { return 1; }
</em>
<em> else { return n*factorial(n-1); } }</em>
<em />
The base case of the above is if (n < = 1) { return 1; }
Because the recursion will continue to be executed until the condition is true i.e. n less than or equals 1