Scheme Exercises
using the SchemeInterpreter engine by Joshua Chin

 Exercise Groups All Calculations Decisions Classic recursions Simple List exercises Challenging recursions

 Exercise List Name Description Factorial The archetypical recursive function. Fibonacci The famous sequence Increment Adding one Mean-2 Average of 2 numbers Circle-area Calculate the area of a circle Absolute value The absolute value of a number Max2 Largest of two numbers sum2 Sum of two numbers. getOnesDigit Extract the ones digit from an integer. Distance Calculate the distance between two coordinates. getTensDigit Extract the tens digit from an integer. Max3 Largest of 3 values Max4 Largest of 4 values Two-part function A function that has two parts, deciding between two alternative answers. Three-part function A function with three different behaviors Multi-branch decision Exercise with "cond" Three-part function (2) A function with three different behaviors (using cond) getNthDigit Retrieve the nth digit of a number getNthDigitFrom0 version of getNthDigit, done recursively and counting the least significant digit as digit 0 List Length Implement a recursive length function Count Evens of List Count the number of even integers in a list of integers. rev3 Reverse the elements of a 3-element list explode3 explode a 3-digit number into the list of its digits implode3 implode a 3-element list of digits into a number remove-one Remove one of the elements of a 3 element list numdigits Count the number of digits of a positive integer sumDigits Add up the digits of a positive number median median will return the median of a sorted list of numbers positionOf Find the position of the first occurrence of an element inside a list lastPositionOf Find the position of the last occurrence of an element inside a list myReverse Reverse the order of the elements of a list ChangeBase Change a number from one base-representation to another base-representation NextPrime Find the next prime at or after a given number Deep Reverse reverse the order of elements even deep inside sublists Sequence Create a list -- an increasing sequence of integers AllEven? Are all the numbers in the list even? Explode Explode an integer into a list of its digits Implode Create a number from a list of its digits Newton's Gravity Calculate the force between two objects using Newton's Law of Gravity discriminant Calculate the discriminant of a quadratic. Quadratic Solver Plus Find a root of a quadratic equation! Which Quadrant Determine the quadrant of the specified point. average Average of 3 numbers parity-match Do the two arguments have the same parity? is-small-prime Is the given number between 2 and 10 a prime? is-medium-prime Is the given number between 2 and 100 a prime? closer-to Is the first number closer to the second number or to the third number? Is between? Is the first number between the second and third?