Answer & Explanation #1
To answer your first query. You can write a function that takes two arguments and returns their sum like this:
#Python program to add two numbers using a function
def add_num(a,b): #function for addition
sum=a+b
return sum #return value
num1=25 #variable declaration
num2=55
print("The sum is",add_num(num1,num2)) #call the function
Answer & Explanation #2
As for your error, I believe it is an indent error in your first return statement. All you must do is indent the return statement.
Answer:
False.
Explanation:
The function of Building Blocks, that contains AutoText which is a helpful tool for incorporating a bulk of info into Word. For ease of access, the user could maybe create building blocks usable throughout the Quick Parts menu well into the Insert tab.
So, we can say that there is no major difference between autocorrect and building block, that's why the following statement is false.
Answer:
all it's updates are free.
Explanation:
zoom is a free downloadable and you can see the zoom cloud when you are trying to log into your zoom account, or after you logged out
<span>The statement about this engine is correct is that </span><span>B. The angle between the two rows of cylinders is 90 degrees. The other choices are incorrect because it does not describe the V-6 with 90-degree engine.</span>
Answer:
import java.util.Arrays;
import java.util.Scanner;
public class LatinHire {
public static void main(String[] args) {
Scanner in = new Scanner (System.in);
System.out.println("Enter Five integers");
int num1 = in.nextInt();
int num2 = in.nextInt();
int num3 = in.nextInt();
int num4 = in.nextInt();
int num5 = in.nextInt();
int [] intArray = {num1,num2,num3,num4,num5};
System.out.println(Arrays.toString(intArray));
System.out.println("The Maximum is "+returnMax(intArray));
System.out.println("The Minimum is "+returnMin(intArray));
}
public static int returnMax(int []array){
int max = array[0];
for(int i=0; i<array.length; i++){
if(max<array[i]){
max= array[i];
}
}
return max;
}
public static int returnMin(int []array){
int min = array[0];
for(int i=0; i<array.length; i++){
if(min>array[i]){
min= array[i];
}
}
return min;
}
}
Explanation:
- This is implemented in Java Programming Language
- Two Methods are created returnMax(Returns the Maximum Value of the five numbers) and returnMin(Returns the minimum of the five numbers)
- In the Main method, the user is prompted to enter five numbers
- The five numbers are saved into an array of integers
- The returnMax and returnMin methods are called and passed the array as parameter.
- The entire array of numbers inputted by the user as well the Max and Min are printed