1.) Write the definition of a function absoluteValue that receives a parameter containing an integer value and returns the absolute value of that parameter.
2.) The factorial of a positive integer n (written n!) is the product 1*2*3*....*n. Write a program that asks the user to input a positive integer and then calculates and displays the factorial of the number. The program should call a function named getN that gets input and guarantees that the input is a positive integer. Also, the factorial of the number input should be calculated with a function named fact. (Below shows a possible outcome of this exercise):
(Ask user to enter an integer) Enter a positive integer: 5
(Output) 5! is 120
Write a program to draw this. Assume the innermost square is 20 units per side, and each successive square is 20 units bigger, per side, than the one inside it.
Figure: see image.
Write a non-fruitful function draw_poly(t, n, sz) which makes a turtle draw a regular polygon. When called with draw_poly(tess, 8, 50), it will draw a shape like this: see image.
Write a fruitful function sum_to(n) that returns the sum of all integer numbers up to and including n. So sum_to(10) would be 1+2+3...+10 which would return the value 55.
Write a function area_of_circle(r) which returns the area of a circle of radius r.