Answer:
## http://pastebin.com/nQWtHb3B
#use above link for formatted program #Python3
c=[float(cord) for cord in input('Enter a point with 2 coordinate :').split(' ')]
base=[0,0]
w=10
h=5
if((abs(c[0]-base[0])<= float(w)/2) and (abs(c[1]-base[1])<= float(h)/2)):
print('Point (',c[0],', ',c[1],') is in the rectange')
else:
print('Point (',c[0],', ',c[1],') is not in the rectange')
Answer:
Program for measurement in meters and then converts it into miles, feet, and inches:
#include<iostream.h>
#include<conio.h>
void main()
{ float meter, mile, feet, inches;
cout<<"enter meters";
cin>>meters";
feet=meter×3.2808;
mile= meter×0.000621371;
inches= meter×39.3701;
cout<<"Value of"<<meter<<"meter"<<"in feet is"<<feet<<"feet":
cout<<"Value of"<<meter<<"meter"<<"in mile is"<<mile<<"mile";
cout<<"Value of"<<meter<<"meter"<<"in inches is"<<inches<<"inches";
getch();
}
no idea either lol, I mean school forces you to learn
..
Answer:
Explanation:
This program is written in Python. It is a function that takes in two arrays. Then it loops through the first array twice, adding each element with the others and comparing the sum to the values in the second array. If a similar value is found in the second array, the program prints out the value and returns True to the user. Otherwise, it returns False. A test case has been created with two array variables that print out False, the output can be seen in the attached image below.
def sumArray(arr1, arr2):
for i in range(len(arr1)):
for x in range(len(arr1)):
sum = 0
if i != x:
sum = arr1[i] + arr1[x]
if sum in arr2:
print(str(sum) + "Found in Second Array")
return True
return False
arr1 = [1, 9, 10, 44]
arr2 = [2, 4, 8, 14]
print(sumArray(arr1, arr2))
2006 is the answer and the boston red sox were the first team to win 5 chamships