עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

עזרה בפרולוג... עבודת בגרות...

Featured Replies

פורסם

אני בכיתה י"א ולומד מחשבים 5 יחידות. השנה למדנו את השפה פרולוג בעזרת התוכנה swi-prolog.

לבגרות אנחנו צריכים לעשות עבודה על נושא שבחרנו ולבחור שאילתות ועל פי השאילתות לכתוב חוקים שיענו על השאילתות.

אני צריך את העזרה שלכם בעבודה. למחר אני צריך להגיש את התקדמות העבודה שלי.

יש לי שתי עובדות ועד עכשיו יש לי כ-6 חוקים שפועלים ועוד 3 שלא פועלים ואני מנסה להפעיל אותם.

בנוסף לזה יש לי עוד כ-10 חוקים לכתוב שאת חלקם אני כבר יודע.

הנושא הוא כיתה. עובדה אחת היא על התלמיד(שם, מקצועות לימוד, שעות לימוד) והעובדה השנייה מתרכזת במורים(שם, מקצועות, ותק).

העובדות נראות כך:

עובדה 1-

%1

student(name(itamar,shenhar),[sub(comp,5),sub(math,5),sub(english,5)],[day(sunday,7),day(monday,6),day(tuesday,6),day(wednsday,6),day(thursday,7),day(friday,6)]).

%2

student(name(omry,krouse),[sub(geo,5),sub(economy,5),sub(math,5),sub(english,5)],[day(sunday,7),day(monday,6),day(tuesday,8),day(wednsday,6),day(thursday,5),day(friday,6)]).

עובדה 2-

%1

teach(name(gil,hanan),[comp,math],15).

%2

teach(name(refaela,lavi),[comp,economy],10).

החוקים שלא עובדיים:

חוק שאמור להחזיר את ממוצע השעות לשבוע של כל התלמידים:(נעזר בשתי חוקי עזר)

%5.1

%how_much_hours_avg21/2

%how_much_hours_avg21(day,hours for this day from all students).

how_much_hours_avg21(_day,L2):-findall(_hour,how_much_days_hours(_,_day,_hour),L2).

%5.2

%how_much_student/1

%how_much_student(num of students).

how_much_student(_students):-findall(_stud,student(_stud,_,_),L1),

length(L1,_students).

%5.3

%how_much_hours_avg22/2

%how_much_hours_avg22(day,average of hourse in this day for all students).

how_much_hours_avg22(_day,_avg):-how_much_hours_avg21(_day,L1),

sumlist(L1,_hours),

how_much_student(_stud),

(_avg is _hours/_stud).

עוד חוק שלא עובד- אמור להחזיר שם מקצוע, מס היחידות שנלמדות במקצוע זה, ורשימת התלמידים שלומדים אותו.

%9

%how_much_stud_units/3

%how_much_stud_units(subject,units,name of student).

how_much_stud_units(_sub,_units,L5):-findall(_sub,(how_much_units(L1),

member(_sub,L1)),L2),

sort(L2,L3),

findall(_name,(member(sub(_sub,_units),

L3),

student(_name,L4,_),member(sub(_sub,

_units),L4),L5).

תודה רבה לעוזרים....

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.