The Distance Education Department at Union County College sponsored an #hourofcode and we covered Elsa/Anna, Angry Birds, and Eliza.
Here is the Python code for a simple calculator:
Here is the Python code for a simple calculator:
# Program make a simple calculator
# that can add, subtract, multiply
# and divide using functions
# define functions
def add(x, y):
"""This function adds two numbers"""
return x + y
def subtract(x, y):
"""This function subtracts two numbers"""
return x - y
def multiply(x, y):
"""This function multiplies two numbers"""
return x * y
def divide(x, y):
"""This function divides two numbers"""
http://www.programiz.com/python-programming/examples/calculator