Tags: %TAGME{ tpaction="" web="SCMP118" tag="" }% view all tags

# Hands On

### Functions

##### Step 1

Write a function to take two numbers n and m, and print the sum, product, division (both ways), and the n^m and m^n

##### Step 2

Write a function that given a monthly savings amount, annual interest rate, and number of years, returns the savings total after that many years. What should the types of each parameter be?

Write another function that asks for the above inputs, and returns them. How?

### Overloaded Functions

Starting point: https://repl.it/@JimSkon/PizzaFunction1

##### Step 1

Given the diameter and costs of two round pizzas determine which is a better buy. You pass the cost and the radius for each.

##### Step 2

Add the option for rectangular pizzas. You enter the length, width and cost of each.

##### Step 3

Ask user which type of pizza, and then call correct function.

Topic revision: r5 - 2019-10-03 - JimSkon

 Home SCMP118 Web P View Edit Account
Copyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback