Answer:
Explanation:
It is important to understand that each of the functions we write can be used and called from other functions we write. This is one of the most important ways that computer programmers take a large problem and break it down into a group of smaller problems.
Answer:
3 will be assigned to a
Explanation:
Given
Function definition: def my_function(a, b, c)
Required
What is the value of a if the function is called as my_function(3, 2, 1)
First, we need to check if the function is rightly called.
myfunction is defined with three parameters a, b and c
myfunction is called with three arguments 3, 2 and 1
When called, the arguments will be assigned to each parameter in the order which they were declared.
This implies that:
Answer:
less
Explanation:
Line 1 // age = 4;
Line 2 // if(age > 5)
Line 3 // out.print("more");
Line 4 // else (out.print("less");
Because age is never changed, it will stay at 4. So in the if statement, we are asked if age is greater than 5, and since we know age is 4, we can say NO to that question. Since we didn't meet the requirements to go inside the If statement, we go on down to the else statement, where we print "less".
Explanation:
Below is the java code for the class MotorBoat : -
public class MotorBoat {
private int tankCapacity;
private int fuelAmount;
private double maxBoatSpeed;
private double currentBoatSpeed;
private double efficacy;
private double distanceTravelled;
public void changeSpeed(double speed){
currentBoatSpeed = speed;
}
public double operateBoat(double time){
distanceTravelled = currentBoatSpeed * time;
return distanceTravelled;
}
}
some things you can try
sign out of teams and back in
refresh the page by pressing ctrl+r
try a different browser
contact Microsoft
-scava