Answer:
len()function:
Explanation:
that's for python btw
i also know java if you want a java version
Answer:
"Case-Based Reasoning" is the answer for the above question.
Explanation:
- Case-Based Reasoning is a process of decision-making theory in which the new problems were solved based on the previously solved problem.
- It is used in artificial intelligence and robots. This helps to make any AI and robots to do the work and take decisions on its own.
- The theory is used to make any computer that behaves like humans. It can take decisions like a human.
- The above question asked about the method by which the new problem is solved on behalf of the old problem. Hence the answer is "Case-Based Reasoning".
Answer:
Following is given the solution to question I hope it will make the concept easier!
Explanation:
1.
name = input("Enter your name: ")
num1 = int(input("Hello "+name+ ", enter an integer: "))
num2 = int(input(name+", enter another integer: "))
try:
if num1 % num2 == 0:
print("The first number is divisible by the second number")
else:
print("The first number is not divisible by the second number")
except ZeroDivisionError:
print("The first number is not divisible by the second number")
try:
if num2 % num1 == 0:
print("The second number is divisible by the first number")
else:
print("The second number is not divisible by the first number")
except ZeroDivisionError:
print("The second number is not divisible by the first number")
2.
import random, math
num1 = float(input("Enter a small decimal number: "))
num2 = float(input("Enter a large decimal number: "))
r = round(random.uniform(num1, num2), 2)
print("The volume of a sphere with radius " + str(r) + " is " + str(round(((4 / 3) * math.pi * (r ** 3)), 2)))
I hope this helps!
JAVA programming was employed...
What we have so far:
* Two 2x3 (2 rows and 3 columns) arrays. x1[i][j] (first 2x3 array) and x2[i][j] (second 2x3 array) .
* Let i = row and j = coulumn.
* A boolean vaiable, x1rules
Solution:
for(int i=0; i<2; i++)
{
for(int j=0; j<3; j++)
{
x1[i][j] = num.nextInt();
}
}// End of Array 1, x1.
for(int i=0; i<2; i++)
{
for(int j=0; j<3; j++)
{
x2[i][j] = num.nextInt();
}
}//End of Array 2, x2
This should check if all the elements in x1 is greater than x2:
x1rules = false;
if(x1[0][0]>x2[0][0] && x1[0][1]>x2[0][1] && x1[0][2]>x2[0][2] && x1[1][0]>x2[1][0] && x1[1][1]>x2[1][1] && x1[1][2]>x2[1][2])
{
x1rules = true;
system.out.print(x1rules);
}
else
{
system.out.print(x1rules);
}//Conditional Statement