Find Jobs
Hire Freelancers

Prolog Programmer 1

€8-30 EUR

Færdiggjort
Slået op cirka 5 år siden

€8-30 EUR

Betales ved levering
Proyect Based in LEGO constructions They are arranged for LEGO constructions. These parts can be rectangles or squares. The pieces are defined by a compound term part / 4, where the first argument represents the width of the piece (number of nails), the second argument the height of the workpiece, the third argument depth (number of nails) and the last argument color piece. • The workpiece dimensions (width, height and depth) are represented as numbers Peano. • Colors that are available are: red (r), blue (a), green (v) and yellow (am). • Example : (S (s (s (s (0)))), s (0), s (s (0)), r) Available parts may be supported on the ground or on another piece assembled, forming a construction. The constructions, they are composed of at least one piece, can be of two types: • Tower: each level of the building has a single piece. In addition, each piece can only be assembled over an equal or larger than she part (the length and width of the bottom piece must be greater or equal to the same dimensions of the top piece). • Building: each level of the building may consist of several pieces (always the same depth and height 1), which can be assembled in any way. (A) The constructions type tower They are represented as lists, where the last part of the tower is the head of the list. The constructions building type They are represented by a matrix (a list of lists) showing the elevation of the building. In said matrix, each row (each inside list) represents a level of construction (building) and each cell (element of internal list) represents a nail one piece by using the color of the piece that is in said instead of the elevation. The number of rows in the array is the number of levels of the building, and the number of columns is the number of nails wider level. The cells of the matrix not including nails parts are represented by the constant 'b'. FIRST PART You are asked to define the following predicates for tower type buildings: • esTorre / 1 ( esTorre (Construction)): predicate checks whether Construction meets the conditions for a tower. • alturaTorre / 2 ( alturaTorre (Built, A)): predicate that tests whether the first argument (Construction) is a tower, and the second argument (A) is the height of the tower. • coloresTorre / 2 ( coloresTorre (Construction, colors)): predicate verifies if the first argument (construction) is a tower and the second argument (Color) is a list with the colors of the tower. • coloresIncluidos / 2 (ColoresIncluidos (Construction1, Construction2)): predicate is verified if (a) both predicates are towers and (b) all colors of Construction1 are also in the Construction2. SECOND PART You are asked to define the following predicates for building construction type: • esEdificioPar / 1 ( esEdificioPar (Construction)): predicate that is true if construction is a building that meets each level has an even number of nails. • esEdificioPiramide / 1 ( esEdificioPiramide (construction): predicate that checks whether construction is a building that meets each level has a strictly higher than the level above wide.
Projekt-ID: 18990658

Om projektet

2 forslag
Projekt på afstand
Aktiv 5 år siden

Leder du efter muligheder for at tjene penge?

Fordele ved budafgivning på Freelancer

Fastsæt dit budget og din tidsramme
Bliv betalt for dit arbejde
Oprids dit forslag
Det er gratis at skrive sig op og byde på jobs
Tildel til:
Brug Avatar.
Hola soy programador experto en prolog, la mayoria de proyectos que he realizado en freelancer han sido proyectos en prolog, puedes verificar mi reputación
€60 EUR på 5 dage
4,8 (11 anmeldelser)
4,3
4,3
2 freelancere byder i gennemsnit €280 EUR på dette job
Brug Avatar.
Hi sir , i can help you with this project if you want kindly contact me to discuss the details , thanks.
€500 EUR på 20 dage
5,0 (7 anmeldelser)
2,2
2,2

Om klienten

Flag for SPAIN
Madrid, Spain
0,0
0
Betalingsmetode verificeret
Medlem siden mar. 18, 2019

Klientverificering

Tak! Vi har sendt dig en e-mail med et link, så du kan modtage din kredit.
Noget gik galt, da vi forsøgte at sende din mail. Prøv venligst igen.
Registrerede brugere Oprettede jobs i alt
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Indlæser forhåndsvisning
Geolokalisering er tilladt.
Din session er udløbet, og du er blevet logget ud. Log venligst ind igen.