mahtab20011
جمعه 21 تیر 1392, 11:08 صبح
سلام من یک برنامه دارم به زبان پرولوگ آیا کسی می تواند این برنامه را به زبان لیسپ تبدیل کند ؟باتشکر
question(alg2, [ %’alg2’ = question identifier; referenced in "next(X)" reaction frames
category:'Algebra', % ‘Algebra’ = question topic; used to identify help topics
prompt:paint( % ‘paint’ creates a graphics windows
[$Solve for x:$, % this slot holds specific content of the question
$ $,
eq(y=m*x+b) ]), % eq(y= m*x + b) draws an equation into the graphics windows
response:choices( % defines a multiple choice question; alternative slot value = true/false
[a: paint([eq(x=(y-b)/m)]), % choices given here
b: paint([eq(x=y/m-b)]),
c: paint([eq(x=m*y+b)]),
d: paint([eq(x=sqrt(m*(y/b)))]) ]),
answer:b, % indicates the correct answer
hint: text([$Divide both sides by m$]), % this slot contains what is displayed when user clicks on hint
help: true, % true makes the help button visible, giving access to help; alternative slot value = false
reaction: [ % reaction frame
ans(a): [qMake1, next(aa1)], % list of prolog clauses, execution triggered by user answer
ans(b): [qMake2, next(ab1)], % selection. These clauses are used to capture expert rules
ans(c): [qMake3, next(ac1)], % defining system behavior in response to student
ans(c): [qMake4, next(ad1)], % performance.
ans(_): [help(linear), next(alg2)] ] ]). % ‘ans(_)’ = "Don’t know"; reaction: open help file.
question(alg2, [ %’alg2’ = question identifier; referenced in "next(X)" reaction frames
category:'Algebra', % ‘Algebra’ = question topic; used to identify help topics
prompt:paint( % ‘paint’ creates a graphics windows
[$Solve for x:$, % this slot holds specific content of the question
$ $,
eq(y=m*x+b) ]), % eq(y= m*x + b) draws an equation into the graphics windows
response:choices( % defines a multiple choice question; alternative slot value = true/false
[a: paint([eq(x=(y-b)/m)]), % choices given here
b: paint([eq(x=y/m-b)]),
c: paint([eq(x=m*y+b)]),
d: paint([eq(x=sqrt(m*(y/b)))]) ]),
answer:b, % indicates the correct answer
hint: text([$Divide both sides by m$]), % this slot contains what is displayed when user clicks on hint
help: true, % true makes the help button visible, giving access to help; alternative slot value = false
reaction: [ % reaction frame
ans(a): [qMake1, next(aa1)], % list of prolog clauses, execution triggered by user answer
ans(b): [qMake2, next(ab1)], % selection. These clauses are used to capture expert rules
ans(c): [qMake3, next(ac1)], % defining system behavior in response to student
ans(c): [qMake4, next(ad1)], % performance.
ans(_): [help(linear), next(alg2)] ] ]). % ‘ans(_)’ = "Don’t know"; reaction: open help file.