Answer:
Returned value: 2
Explanation:
Public int f(int k, int n) {
if (n == k)
return k;
else if (n > k)
return f(k, n - k);
else return f(k - n, n);
}
/////////////////////////////////////////////////////////////////////////////////////////
Trace of function calls,
f(6, 8)
f(k, n - k) -> (6, 2)
f(k - n, n) -> (4, 2)
f(k - n, n) -> (2, 2)
return k
Answer:
in1 = int(input("Enter value one: "))
in2 = int(input("Enter value two: "))
print(in1,type(in1), in2, type(in2))
if (in1 <=0 and in2 <=0) or (not in1 <=0 and not in2<=0):
print( True)
else:
print( False)
Explanation:
The if statement of the python source code is used to implement an Exclusive-NOR logic gate that gives a true or high value if both inputs are either true or false.
Answer:
import java.util.*;
public class Country
{
public static void main(String args[])
{
char ch,temp;
int flag = 0;
String country;
ArrayList<String> countries = new ArrayList<String>();
Scanner sc = new Scanner(System.in);
do
{
System.out.println("enter the country you have visited:\t");
country = sc.next();
for(int i=0;i<countries.size();i++)
{
if(countries.get(i).equals(country))
{
System.out.println("you have already entered the country");
flag = 1;
break;
}
}
if(flag == 0)
{
countries.add(country);
flag = 0;
}
System.out.println("want to add another country(y/n):\t");
ch = sc.next().charAt(0);
}while(ch!='n');
Collections.sort(countries);
System.out.println("Countries you have visited:\t"+countries);
System.out.println("Total number of contries visited:"+countries.size());
}
}
Explanation:
HDDs usually wear down faster and give less performance quality than SSD but HDDs are still cheaper. If your aiming for budget , HDD is the right one for you.
Solution:
A(n) extranet is a lan that uses the same technologies as the internet but is provided to invited users outside the organization who access it over the internet.
An extranet is a private network that uses Internet technology and the public telecommunication system to securely share part of a business's information or operations with suppliers, vendors, partners, customers, or other businesses. An extranet can be viewed as part of a company's intranet that is extended to users outside the company. It has also been described as a "state of mind" in which the Internet is perceived as a way to do business with other companies as well as to sell products to customers.
This is the right answer.