Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ejercicio Texto

266 views

Published on

Published in: Education
  • Be the first to comment

  • Be the first to like this

Ejercicio Texto

  1. 1. frame animales ; default vive is si and default respira is si and default quien_es is no_se . frame animales_de_granja is a animales ; default domesticados is si and default productores_de_comida is si . frame animales_de_hogar is a animales ; default domesticados is si and default productores_de_comida is no . /*animales de granja*/ frame productores_de_leche is a animales_de_granja ; default produce_leche is si and default produce_carne is si . frame productores_de_carne is a animales_de_granja ; default produce_leche is no and default produce_carne is si . /*productores de leche*/ frame vaca is a productores_de_leche ; default familia is bovidae and default animal_de_tiro is si . frame cabra is a productores_de_leche ; default familia is caprinae and default animal_de_tiro is no . /*vaca*/ frame vaca_normanda is a vaca ; default mancha is si and default cuernos is echados . frame vaca_limusina is a vaca ; default mancha is no and default cuernos is horizontales . /*cabra*/
  2. 2. frame cabra_walie is a cabra ; default origen is etiopia and default gestacion is '150_dias' . frame cabra_ibex is a cabra ; default origen is alpes and default gestacion is '170_dias' . /*productores de carne*/ frame gallina is a productores_de_carne ; default recubrimiento is plumas and default vida is '5_a_10_a?os' . frame cerdo is a productores_de_carne ; default recubrimiento is pelos and default vida is '10_a_15_a?os' . /*gallina*/ frame gallina_murciana is a gallina ; default peso is '3.75_kg' and default incuban_sus_huevos is si . frame gallina_de_andalucia is a gallina ; default peso is '3.0_kg' and default incuban_sus_huevos is no . /*cerdo*/ frame cerdo_pietrain is a cabra ; default origen is belga and default peso is '300_kg' . frame cerdo_yorkshire is a cabra ; default origen is inglaterra and default peso is '420_kg' . /*animales de hogar*/ frame terrestre is a animales_de_hogar ; default respiracion is pulmonar and default viven is tierra . frame acuatico is a animales_de_hogar ; default respiracion is branqueal_o_pulmonar
  3. 3. and default viven is agua . /*terrestre*/ frame gato is a terrestre ; default comunicacion is maullido and default olfato is poco_desarrollado . frame perro is a terrestre ; default comunicacion is ladrido and default olfato is desarrollado . /*gato*/ frame gato_persa is a gato ; default tipo_pelo is largo and default ojos is grandes . frame gato_azul_ruso is a gato ; default tipo_pelo is corto and default ojos is medianos . /*perro*/ frame san_bernardo is a perro ; default altura is '90_cm' and default originario is suiza . frame bulldog is a perro ; default altura is '40_cm' and default originario is inglaterra . /*acuatico*/ frame peces is a acuatico ; default extremidades is aletas and default recubrimiento is escamas . frame tortuga is a acuatico ; default extremidades is patas and default recubrimiento is caparazon . /*peces*/ frame goldfish is a peces ; default longitud is '60_cm' and default peso is '3_cm' . frame anchoa is a peces ; default longitud is '20_cm'
  4. 4. and default peso is '50_cm' . /*tortuga*/ frame ariete is a tortuga ; default puesta is '1_huevo' and default habitat is africa . frame matamata is a tortuga ; default puesta is '28_huevos' and default habitat is suramerica . /*Preguntas*/ question p1 ?respira? ; choose from si, no . question p2 ?producen comida a las personas? ; choose from si, no . question p3 ?producen leche? ; choose from si, no . question p4 pertenece a la familia de: ; choose from bovidae, caprinae . question p5 ?tiene manchas en la piel? ; choose from si, no . question p6 ?su periodo de gestacion es? ; choose from '150_dias', '170_dias' . question p7 ?estan recubierto de? ; choose from plumas, pelos . question p8 ?este animal incuba sus huevos? ; choose from si, no .
  5. 5. question p9 ?su peso aproximado es de? ; choose from '300_kg', '420_kg' . question p10 su respiracion es: ; choose from pulmonar, branqueal_o_pulmonar . question p11 su comunicacion es: ; choose from maullido, ladrido . question p12 ?como son sus ojos? ; choose from grandes, medianos . question p13 su altura es de: ; choose from '90_cm', '40_cm' . question p14 sus extremidades son: ; choose from aletas, patas . question p15 ?cuantos huevos coloca? ; choose from '1_huevo', '28_huevos' . question p16 su longitud es de: ; choose from '60_cm', '20_cm' . /*reglas*/ rule r2 if the p2 is si and the p3 is si and the p4 is bovidae and the p5 is si then the animales`s quien_es becomes vaca_normanda . rule r3 if the p2 is si
  6. 6. and the p3 is si and the p4 is bovidae and the p5 is no then the animales`s quien_es becomes vaca_limusina . rule r4 if the p2 is si and the p3 is si and the p4 is caprinae and the p6 is '150_dias' then the animales`s quien_es becomes cabra_walie . rule r5 if the p2 is si and the p3 is si and the p4 is caprinae and the p6 is '170_dias' then the animales`s quien_es becomes cabra_ibex . rule r6 if the p2 is si and the p3 is no and the p7 is plumas and the p8 is si then the animales`s quien_es becomes gallina_murciana . rule r7 if the p2 is si and the p3 is no and the p7 is plumas and the p8 is no then the animales`s quien_es becomes gallina_de_andalucia . rule r8 if the p2 is si and the p3 is no and the p7 is pelos and the p9 is '300_kg' then the animales`s quien_es becomes cerdo_pietrain . rule r9 if the p2 is si and the p3 is no and the p7 is pelos and the p9 is '420_kg'
  7. 7. then the animales`s quien_es becomes cerdo_yorkshire . rule r10 if the p2 is no and the p10 is pulmonar and the p11 is maullido and the p12 is grandes then the animales`s quien_es becomes gato_persa . rule r11 if the p2 is no and the p10 is pulmonar and the p11 is maullido and the p12 is medianos then the animales`s quien_es becomes gato_azul_ruso . rule r12 if the p2 is no and the p10 is pulmonar and the p11 is ladrido and the p13 is '90_cm' then the animales`s quien_es becomes san_bernardo . rule r13 if the p2 is no and the p10 is pulmonar and the p11 is ladrido and the p13 is '40_cm' then the animales`s quien_es becomes bulldog . rule r14 if the p2 is no and the p10 is branqueal_o_pulmonar and the p14 is patas and the p15 is '1_huevo' then the animales`s quien_es becomes tortuga_ariete . rule r15 if the p2 is no and the p10 is branqueal_o_pulmonar and the p14 is patas and the p15 is '28_huevos' then the animales`s quien_es becomes tortuga_matamata . rule r16
  8. 8. if the p2 is no and the p10 is branqueal_o_pulmonar and the p14 is aletas and the p16 is '60_cm' then the animales`s quien_es becomes goldfish . rule r17 if the p2 is no and the p10 is branqueal_o_pulmonar and the p14 is aletas and the p16 is '20_cm' then the animales`s quien_es becomes anchoa . group g1 r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17 . ruleset rset1 contains g1 ; update ruleset by removing each selected rule . action run ; do restart and invoke ruleset rset1 and echo ('el animal que busca es:', animales`s quien_es) and nl .

×