Asked by Lena

In the program Turing, how would you move an box randomly around the screen. This is what I have so far:

for row: 3..10
for column: 10..30
locate (row,column)
put " "..
end for

I think this creates a box. How would I move this box across the screen by only using randint and delay?

Answers

Answered by Leo
You would need to create two variables, one for row and one for column. Each variable would be assigned a random integer within the range that you listed above.
Answered by Lena
how would you write that?
(I don`t have the program with me)

Answered by Lena
var row,column: int
randint (row,3,10)
randint (column,10,30)
locate (row,column)
put " "..

??
i`m actually very new at this so i`m very confused
Answered by Leo
I am not familiar with the exact syntax of the language you are using. But in pseudo code, it appears you have the right idea.
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions