Question: Questions about loops

I'm new to Maple, and I come from using Matlab.  Apparently my Matlab way of thinking isn't working on Maple.  I'm trying  to ride a bit of code that simulates flipping a coin 1000 times.  The code counts one partiuclar result (1=heads) at the end prints that result.

 

Here's the code:

 

dice:=proc()

count:=0:  

for i from 1 to 10000 do  

roll := rand(1..2):  

roll:=()  

if (roll=1) then count:=count+1 end if  

end do  

print(count)  

 I get errors saying I didn't terminate my loops correctly.  Help, please.

Please Wait...