.


:




:

































 

 

 

 


Point (X,Y)





□ oint<X1,Y>


poitttfX.Y]

. 2.8. -

:

?- vertical (seg{ point {1,1J( point! 1,2) j). yes

?- vertical (seg; point11,1), point!2,Y>)). no

;- horizontal(seg(point(1,1), point (2,Y})), Y - 1

"yes", . - . Y 1 .

, - , {2,3)?

?- vertical! seg(point(2,3),)>. P = point(2,Y}

, , [2, Y), , = 2. , Prolog , , ( Prolog1) ■ : = point <2,_136)

. 136 , , 13 , . , . : -, , , , -, - , "" .


2, Prolog



, , .

?- vertical! S), horizontal (S).

s = segl point(X,Y), point(x,Y})

Prolog , , , . . , X Y , .

2.3.
? ,
?

) point(, ) = point 1, 2).

) pain (, ) = point (X, Y, 2).

) plus! 2, 2) = 4.

) +(2, D) = ■(, 2).

) triangle(point(>lr0), 2, ) = triangle(PI, point(1,0),

point (0,Y)).

. ?

2.4. , , , , = 5.

2.5. , rectangle! PI, P2, , 4), , .

regular (R)

, R .





:


: 2015-10-01; !; : 534 |


:

:

. .
==> ...

1618 - | 1560 -


© 2015-2024 lektsii.org - -

: 0.01 .