%Choose a square or circle
%Choose a colour
put "What object you would like to use"
%See choice of square or circle
drawbox (400, 300, 300, 200, 7)
drawoval (350, 100, 50, 50, 7)
%Use shape as a varibale
var shape : int
%Show text of choices with 1 being Square and 2 being Circle
put "Square - 1 or Circle - 2?"
%Get response
get shape
%clear screen
Draw.Cls
%If square is chosen draw square
if shape = 1 then
drawbox (400, 300, 300, 200, 7)
%if square is not choosen draw circle
else
drawoval (350, 100, 50, 50, 7)
end if
%Pick your colour
var c : int
%Show text of colour choices
put "Choose colour to fill shape"
put "1 - Red"
put "2 - Blue"
put "3 - Random"
%Get answer
get c
%If red- 1 draw redbox
if c = 1 then
drawfillbox (400, 300, 300, 200, 12)
end if
%if blue -2 draw bluebox
if c = 2 then
drawfillbox (400, 300, 300, 200, 1)
end if
%if random -3 draw randombox
if c = 3 then
%loop through colours 1-15
loop
for i : 1..15
colour (i)
drawfillbox (400, 300, 300, 200, i)
delay (750)
end for
end loop
end if
|