Langsung ke konten utama

Postingan

Menampilkan postingan dari November, 2017

Problem Solving Visualization using Scratch

Problem: Plant Life The Beaver loves flowers. May be this is the reason why he has invented a simple programming language for visual design based on the idea of plant life. Each picture starts with a square called a. A visual object can perform three operations: grow(), split() and die(). The following program explains the semantics:                                                            a.grow(east);  a.grow(east) ; b,c = a.split();  c.grow(north);  b.die(); Please note, that only an  oblong  object may execute the split()-Operation producing two shorter Objects of equal size. A square cannot be split. Beaver wants to write a program that transforms the left image to the right image. Which could be the first four commands of this program? Answer: A. a.grow(east); a.grow(east); b,c = a.sp...