Below is the function that takes two parallel lists;
List of times in increasing order and that of distance travelled by that point in time.
I put into consideration the instructions given in the question.
ANSWER;
def find_velocity(time, distance):
velocities = []
for i in range(1, len(time)):
velocities.append((distance[i] - distance[i - 1]) / (time[i] - time[i - 1]))
return velocities
times are = [1, 3, 5, 7]
distances are = [25, 29, 35, 70]
print(find_velocity(times, distances))
Answer:
number = int(input("Enter number: "))
if (number % 4):
print("{} is not divisible by 4".format(number))
else:
print("{} is divisible by 4".format(number))
Explanation:
If the %4 operation returns a non-zero number, there is a remainder and thus the number is not divisable by 4.
Answer:
public static double areaSum(Circle c1, Circle c2){
double c1Radius = c1.getRadius();
double c2Radius = c2.getRadius();
return Math.PI * (Math.pow(c1Radius, 2) + Math.pow(c2Radius, 2));
public static void main(String[] args){
Circle c1 = new Circle(6.0);
Circle c2 = new Circle(8.0);
areaSum(c1,c2);
}
Explanation:
Answer:
A. A1
Explanation:
Worksheet's Columns are named with Alphabets. i.e. A,B,C,D,E....
And Worksheet's rows are named with numbers. i.e. 1,2,3,4,5....
So the intersection of first row number as "1" and First Column name as "A" is A1 as worksheet displays column name first and then row number.