Create a scratch program to eat carrots by a rabbit and set a variable score as 0. The carrot will move randomly and the rabbit will move according to the mouse movement. When the rabbit touches the carrot the rabbit size should be increased by 10 and the score should increase by 1. This process should continue until the score become 10. When the score is 10, say GAME OVER.
Answers
Answered by
0
Answer: Set a variable called score.
Then, drag the following blocks into the carrot sprite:
when green flag clicked
forever (loop start)
go to [random position]
wait (3) secs
(loop end)
when green flag clicked
forever (loop start)
if touching [rabbit] then (loop start)
go to [random position] (loop end)
(loop end)
Drag the following blocks into the rabbit sprite:
when green flag clicked
set [score] to (0)
forever (loop start)
go to [cursor/mouse pointer]
if touching [carrot] then (loop start)
change (score) by (1)
if [score = 10] then (loop start)
stop [all](loop end)
wait (0.1) secs (loop end)
(loop end)
Explanation:
Similar questions