FOR PEOPLE:
boil the water
put noodles into the water
put them in a plate
add sauce if you want
FOR COMPUTER:
function boilWater:
with waterBoiler,
fill with cold water,
if waterBoiler=full:
stop fill
turn water Boiler switch to"on"
when water boiling
execute function put Noodles
function put Noodles:
desiredTime=10min
get noodles
with noodles:
place inside waterBoiler
start counting time
when Time=10min
turn waterBoiler switch to off
execute function fill plate
function fill Plate
get plate
place plate right to waterBoiler
with water Boiler:
move 20cm up
turn-90
if plate="full"
with waterBoiler:
turn90
move 20cm down
execute function add Sauce
finction add Sauce
desired Sauce=1
get sauce
with sauce
place inside plate
if desired Sauce>0
execute function add sauce
else:
finish
Saturday, April 25, 2009
Subscribe to:
Post Comments (Atom)
there is still a bit of clarification to be made here. The commands are not in a very clear order (which is very important for scripting), and the lack of identation (which is very important for Python) make it a bit hard to read and understand.
ReplyDeleteGo shopping
ReplyDeleteHuman instructions:
Enter the store
Choose goods what you what
Pay for the money
Go home
Computer instructions:
Function enter the store
Go to the door
If door is open, enter;
Else open it, enter.
Execute function choose goods
Walk around the store
Find goods what you want
If you want to buy it, take it;
Else back it original.
Execute function pay for money
Take goods to cashier's
See how much you should pay for
Give money to cashier
If money is right, go home;
Else wait for cashier give you change, go home