Create a new script that uses a Turtle to draw a simple house like the following:
The first line of code of your script must be the definition of a variable calledwidth
and the house that the script draws must be the width specified by thewidth
variable.Note that the bottom of the house is a square and that the top of the house is an equilateral triangle.
Create a new script that uses a Turtle to draw a fish like the following:
The first line of code of your script must be the definition of a variable calledheight
and the fish that the script draws must be the height specified by theheight
variable.Note that the circumference, c, of a circle can be computed from the radius, r, with the following equation:
c = 2 π r
Use
math → pi
in TouchDevelop to get the value of π. Also note that this is much more simple if the curves in your drawing use a turn angle of 1 degree.
Submission
Please show your source code and run your scripts for the instructor or lab assistant.