1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Feliz [49]
3 years ago
14

Write a function (euclid point1 point2) that accepts two parameters, each being a list containing exactly two numbers that defin

e a two-dimensional point. Return the Euclidean distance between the two points. Use cond to check for the proper input (lists that contain exactly two numbers). If the input is improper, return
Engineering
1 answer:
Mazyrski [523]3 years ago
4 0

Answer:

Explanation:

Solution:

-The task is more likely to compute the distance of n-dimensional vectors, i.e.

sqrt((x1-y1)^2 + ... + (xn-yn)^2).

- With a recursive version, I consider that p and q are two mathematical vectors, so that p contains different coordinates (p1, ..., pn), which differs from your implementation where p contains all x's and q all y's.

- So, you have to compute (pi - qi)^2 for each for pair (pi, qi) of elements taken in parallel from p and q, sum the intermediate values and take the square root.

- The function would be as follows:

 " (defun euclidean-distance-it (p q)

      (destructuring-bind (x1 x2) p

          (destructuring-bind (y1 y2) q

               (sqrt (+ (expt (- x1 y1) 2)

                       (expt (- x2 y2) 2)))))) "

- With high-order functions, you don't even need to use recursion. The function would be:

     "  (defun distance (p q)  

                 (sqrt

                    (reduce #'+  

                       (map 'list

                           (lambda (px qx) (expt (- px qx) 2))  

                            p q)))) "

You might be interested in
Bridging are members installed periodically between joists to ensure which of the following?
Pie

Answer:

Distributes a floor load or weight

Explanation:

5 0
3 years ago
A four-cylinder, four-stroke internal combustion engine has a bore of 3.7 in. and a stroke of 3.4 in. The clearance volume is 16
Bad White [126]

Answer:

the net work per cycle \mathbf{W_{net} = 0.777593696}  Btu per cycle

the power developed by the engine, W = 88.0144746 hp

Explanation:

the information given includes;

diameter of the four-cylinder bore = 3.7 in

length of the stroke = 3.4 in

The clearance volume = 16% = 0.16

The cylindrical volume V_2 = 0.16 V_1

the crankshaft N rotates at a speed of  2400 RPM.

At the beginning of the compression , temperature T_1 = 60 F = 519.67 R    

and;

Otto cycle with a pressure =  14.5 lbf/in² = (14.5 × 144 ) lb/ft²

= 2088 lb/ft²

The maximum temperature in the cycle is 5200 R

From the given information; the change in volume is:

V_1-V_2 = \dfrac{\pi}{4}D^2L

V_1-0.16V_1= \dfrac{\pi}{4}(3.7)^2(3.4)

V_1-0.16V_1= 36.55714291

0.84 V_1 =36.55714291

V_1 =\dfrac{36.55714291}{0.84 }

V_1 =43.52040823 \ in^3 \\ \\  V_1 = 43.52 \ in^3

V_1 = 0.02518 \ ft^3

the mass in air ( lb) can be determined by using the formula:

m = \dfrac{P_1V_1}{RT}

where;

R = 53.3533 ft.lbf/lb.R°

m = \dfrac{2088 \ lb/ft^2 \times 0.02518 \ ft^3}{53.3533 \ ft .lbf/lb.^0R  \times 519 .67 ^0 R}

m = 0.0018962 lb

From the tables  of ideal gas properties at Temperature 519.67 R

v_{r1} =158.58

u_1 = 88.62 Btu/lb

At state of volume 2; the relative volume can be determined as:

v_{r2} = v_{r1}  \times \dfrac{V_2}{V_1}

v_{r2} = 158.58 \times 0.16

v_{r2} = 25.3728

The specific energy u_2 at v_{r2} = 25.3728 is 184.7 Btu/lb

From the tables of ideal gas properties at maximum Temperature T = 5200 R

v_{r3} = 0.1828

u_3 = 1098 \ Btu/lb

To determine the relative volume at state 4; we have:

v_{r4} = v_{r3} \times \dfrac{V_1}{V_2}

v_{r4} =0.1828 \times \dfrac{1}{0.16}

v_{r4} =1.1425

The specific energy u_4 at v_{r4} =1.1425 is 591.84 Btu/lb

Now; the net work per cycle can now be calculated as by using the following formula:

W_{net} = Heat  \ supplied - Heat  \ rejected

W_{net} = m(u_3-u_2)-m(u_4 - u_1)

W_{net} = m(u_3-u_2- u_4 + u_1)

W_{net} = m(1098-184.7- 591.84 + 88.62)

W_{net} = 0.0018962 \times (1098-184.7- 591.84 + 88.62)

W_{net} = 0.0018962 \times (410.08)

\mathbf{W_{net} = 0.777593696}  Btu per cycle

the power developed by the engine, in horsepower. can be calculated as follows;

In the  four-cylinder, four-stroke internal combustion engine; the power developed by the engine can be calculated by using the expression:

W = 4 \times N'  \times W_{net

where ;

N' = \dfrac{2400}{2}

N' = 1200 cycles/min

N' = 1200 cycles/60 seconds

N' = 20 cycles/sec

W = 4 × 20 cycles/sec ×  0.777593696

W = 62.20749568 Btu/s

W = 88.0144746 hp

8 0
3 years ago
Calculate the viscosity(dynamic) and kinematic viscosity of airwhen
nikitadnepr [17]

Answer:

(a) dynamic viscosity = 1.812\times 10^{-5}Pa-sec

(b) kinematic viscosity = 1.4732\times 10^{-5}m^2/sec

Explanation:

We have given temperature T = 288.15 K

Density d=1.23kg/m^3

According to Sutherland's Formula  dynamic viscosity is given by

{\mu} = {\mu}_0 \frac {T_0+C} {T + C} \left (\frac {T} {T_0} \right )^{3/2}, here

μ = dynamic viscosity in (Pa·s) at input temperature T,

\mu _0= reference viscosity in(Pa·s) at reference temperature T0,

T = input temperature in kelvin,

T_0 = reference temperature in kelvin,

C = Sutherland's constant for the gaseous material in question here C =120

\mu _0=4\pi \times 10^{-7}

T_0 = 291.15

\mu =4\pi \times 10^{-7}\times \frac{291.15+120}{285.15+120}\times \left ( \frac{288.15}{291.15} \right )^{\frac{3}{2}}=1.812\times 10^{-5}Pa-swhen T = 288.15 K

For kinematic viscosity :

\nu = \frac {\mu} {\rho}

kinemic\ viscosity=\frac{1.812\times 10^{-5}}{1.23}=1.4732\times 10^{-5}m^2/sec

3 0
3 years ago
Martha has been running a small business for two years. She now seeks additional investment to finance her business. She has fou
Dafna11 [192]

Answer:

The correct option is B) Balance Sheet

Explanation:

A Balance Sheet offers a description of a company's obligations, assets, and investments as well as net income over a given span of time such as a period of 6 months or 12 months, for instance.

Also known as the Statement of Financial Position, it contains sufficient information for investors and business owners to determine the company's financial performance in that period as well as to compare the performance of that company with industry norms or competition.

Cheers

8 0
3 years ago
What Happens If A Sonic Boom Is Created?
Volgvan

Answer:

Explanation:

A sonic boom is a loud sound kind of like an explosion. It's caused by shock waves created by any object that travels through the air faster than the speed of sound. Sonic booms create huge amounts of sound energy. When an object moves through the air, it makes pressure waves in front of and behind it.

8 0
3 years ago
Other questions:
  • An inventor claims to have developed a power cycle operating between hot and cold reservoirs at 1175 K and 295 K, respectively,
    9·1 answer
  • Source water pollution in Madagascar
    14·1 answer
  • What are example for mantle
    5·1 answer
  • Turn the motor around in the circuit. What happens?
    12·1 answer
  • Why did fprtmiu78t7ty87uhyu
    12·1 answer
  • A two-bus power system is interconnected by one transmission line. Bus 1 is a generator bus with specified terminal voltage magn
    6·1 answer
  • A reservoir is 1 km wide and 10 km long and has an average depth of 100m. Every hour, 0.1% of the reservoir's volume drops throu
    5·1 answer
  • How old are legos? Who created them? Why did they create them?
    11·1 answer
  • Elements of parallel computing
    10·1 answer
  • assuming complementary inputs are available, the minimum number of transistors needed to realize a two input xor gate is:
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!