Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dengue.pl #1633

Open
MadBri opened this issue Nov 18, 2024 · 0 comments
Open

dengue.pl #1633

MadBri opened this issue Nov 18, 2024 · 0 comments

Comments

@MadBri
Copy link

MadBri commented Nov 18, 2024

Diagnóstico_dengue
% Definición de los síntomas
sintoma(fiebre).
sintoma(dolor_de_cabeza).
sintoma(dolor_en_las_articulaciones).
sintoma(dolor_muscular).
sintoma(rash).
sintoma(nauseas).
sintoma(vomitos).

% Regla para diagnosticar dengue
diagnostico_dengue(Sintomas) :-
findall(S, (member(S, Sintomas), sintoma(S)), SintomasValidos),
length(SintomasValidos, CantidadSintomas),
CantidadSintomas >= 3.

  %Rama síntomas 

git checkout -b rama_sintomas
echo "% Definición de los síntomas" > dengue.pl
echo "sintoma(fiebre)." >> dengue.pl
echo "sintoma(dolor_de_cabeza)." >> dengue.pl
echo "sintoma(dolor_en_las_articulaciones)." >> dengue.pl
echo "sintoma(dolor_muscular)." >> dengue.pl
echo "sintoma(rash)." >> dengue.pl
echo "sintoma(nauseas)." >> dengue.pl
echo "sintoma(vomitos)." >> dengue.pl
git add dengue.pl
git commit -m "Definir síntomas de dengue"
git push origin rama_sintomas

% Rama diagnóstico
git checkout main
git checkout -b rama_diagnostico
echo "% Regla para diagnosticar dengue" >> dengue.pl
echo "diagnostico_dengue(Sintomas) :-" >> dengue.pl
echo " findall(S, (member(S, Sintomas), sintoma(S)), SintomasValidos)," >> dengue.pl
echo " length(SintomasValidos, CantidadSintomas)," >> dengue.pl
echo " CantidadSintomas >= 3." >> dengue.pl
git add dengue.pl
git commit -m "Implementar regla de diagnóstico"
git push origin rama_diagnostico

%Rama ejemplo
git checkout main
git checkout -b rama_ejemplo
echo "% Ejemplo de uso:" >> dengue.pl
echo "% ?- diagnostico_dengue([fiebre, dolor_de_cabeza, rash])." >> dengue.pl
git add dengue.pl
git commit -m "Agregar ejemplos de uso"
git push origin rama_ejemplo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant