ProgramByDesign: Difference between revisions

Content deleted Content added
m Fixed a typo found with Wikipedia:Typo_Team/moss.
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 22:
 
Here is an example:
<sourcesyntaxhighlight lang="racket">
(require 2htdp/universe)
(require 2htdp/image)
Line 35:
 
(animate create-image)
</syntaxhighlight>
</source>
This short program simulates an apple falling from the top to the bottom of a small white canvas. It consists of three parts:
* A function definition for create-image, which is a one-line function in mathematics, assuming an algebra of images with place-image, circle, and empty-scene have been introduced