Define a function f that computes the square of its argument.

40.1

[ Click to enter code ]

Define a function poly that takes an integer, and makes a picture of an orange regular polygon with that number of sides.

40.2

[ Click to enter code ]

Define a function f that takes a list of two elements and puts them in reverse order.

40.3

[ Click to enter code ]

Create a function f that takes two arguments and gives the result of multiplying them and dividing by their sum.

40.4

[ Click to enter code ]

Define a function f that takes a list of two elements and returns a list of their sum, difference and ratio.

40.5

[ Click to enter code ]

Define a function evenodd that gives Black if its argument is even and White otherwise, but gives Red if its argument is 0.

40.6

[ Click to enter code ]

Define a function f of three arguments where the second two arguments are added if the first argument is 1, multiplied if it’s 2 and raised to a power if it’s 3.

40.7

[ Click to enter code ]

Define a Fibonacci function f with f[0] and f[1] both being 1, and f[n] for integer n being the sum of f[n-1] and f[n-2].

40.8

[ Click to enter code ]

Create a function animal that takes a string, and gives a picture of an animal with that name.

40.9

[ Click to enter code ]

Define a function nearwords that takes a string and an integer n, and gives the n words in WordList[ ] that are nearest to a given string.

40.10

[ Click to enter code ]