NO-NAME
|
Posted: Sun Jun 08, 2008 12:58 pm Post subject: Re: RE:how can i get it higher automatically |
|
|
Tony @ Sun Jun 08, 2008 12:45 pm wrote: I think you just need to draw the image mapped to the sum of the correct answers so far.
Pic.Draw("img_" + intstr(num_correct) + ".jpg")
Or something similar.
Obviously you should not increment the num_correct if the answer is wrong.
i just programm them in the simple way so it can moves to the next step
but i didnt think about if there has any wrong - -|||
can u tell me more details? im a beginner.
setscreen ("graphics")
var picid1 : int := Pic.FileNew ("1.jpg")
picid1 := Pic.FileNew ("1.jpg")
process ladder
var picid : int := Pic.FileNew ("ladder.jpg")
picid := Pic.FileNew ("ladder.jpg")
Pic.Draw (picid, 310, 0, picMerge)
drawfillbox (600, 290, 605, 318, gray)
drawfillbox (605, 310, 625, 318, red)
Pic.Draw (picid1, 290, 0, picMerge)
end ladder
process question
var Q1, Q1A1, Q1A2, Q1A3 : int
Q1 := Font.New ("serif:12")
assert Q1 > 0
Q1A1 := Font.New ("serif:12")
assert Q1A1 > 0
Q1A2 := Font.New ("serif:12")
assert Q1A2 > 0
Q1A3 := Font.New ("serif:12")
assert Q1A3 > 0
Font.Draw ("1)HTML is short for ____.", 0, 340, Q1, red)
Font.Draw ("a) HappyText Markup Language.", 0, 320, Q1A1, green)
Font.Draw ("b) HyperText Makeup Language.", 0, 300, Q1A2, green)
Font.Draw ("c) HyperText Markup Language.", 0, 280, Q1A3, green)
Font.Free (Q1)
Font.Free (Q1A1)
Font.Free (Q1A2)
Font.Free (Q1A3)
var answer : string
const height1 :=290
get answer
if answer = "c" then
drawfillbox (290, 0, 360, 60, 0)
Pic.Draw (picid1, 350, 40, picMerge)
elsif answer = "C" then
drawfillbox (290, 0, 360, 60, 0)
Pic.Draw (picid1, 350, 40, picMerge)
else
Pic.Draw (picid1, 290, 0, picMerge)
end if
drawfillbox (0, 250, 250, 360, 0)
var Q2, Q2A1, Q2A2, Q2A3 : int
Q2 := Font.New ("serif:12")
assert Q2 > 0
Q2A1 := Font.New ("serif:12")
assert Q2A1 > 0
Q2A2 := Font.New ("serif:12")
assert Q2A2 > 0
Q2A3 := Font.New ("serif:12")
assert Q2A3 > 0
Font.Draw ("2)'URL' is stand for __.", 0, 340, Q2, red)
Font.Draw ("a) Uniform Resource Locator.", 0, 320, Q2A1, green)
Font.Draw ("b) Unit Resource Locator.", 0, 300, Q2A2, green)
Font.Draw ("c) Uniform Resources Locator.", 0, 280, Q2A3, green)
Font.Free (Q2)
Font.Free (Q2A1)
Font.Free (Q2A2)
Font.Free (Q2A3)
get answer
if answer = "a" then
drawfillbox (350, 40, 420, 120, 0)
Pic.Draw (picid1, 410, 80, picMerge)
elsif answer = "A" then
drawfillbox (350, 40, 420, 120, 0)
Pic.Draw (picid1, 410, 80, picMerge)
else
Pic.Draw (picid1, 350, 40, picMerge)
end if
drawfillbox (0, 250, 250, 360, 0)
var Q3, Q3A1, Q3A2, Q3A3 : int
Q3 := Font.New ("serif:12")
assert Q3 > 0
Q3A1 := Font.New ("serif:12")
assert Q3A1 > 0
Q3A2 := Font.New ("serif:12")
assert Q3A2 > 0
Q3A3 := Font.New ("serif:12")
assert Q3A3 > 0
Font.Draw ("3) What's 'www' stand for ?", 0, 340, Q3, red)
Font.Draw ("a) Wire Wide Web.", 0, 320, Q3A1, green)
Font.Draw ("b) Work Wide Web.", 0, 300, Q3A2, green)
Font.Draw ("c) World Wide Web.", 0, 280, Q3A3, green)
Font.Free (Q3)
Font.Free (Q3A1)
Font.Free (Q3A2)
Font.Free (Q3A3)
get answer
if answer = "c" then
drawfillbox (350, 60, 420, 120, 0)
Pic.Draw (picid1, 440, 130, picMerge)
elsif answer = "C" then
drawfillbox (350, 60, 420, 120, 0)
Pic.Draw (picid1, 460, 120, picMerge)
else
end if
end question
fork ladder
fork question |
|
|