Started Rectangle Project

This commit is contained in:
cmitchell2301 2025-12-14 18:34:36 -05:00
commit 26e1253c0d
39 changed files with 544 additions and 0 deletions

View file

@ -0,0 +1,45 @@
# Simple function examples
#No input parameters
def myFunction1():
print("You are in myFunction1")
# Two input patrameters
def myFunction2(x,y):
print("You are in myFunction2")
print("x = ",x)
print("y = ",y)
return(x + y)
# Two input parameters with predefined valiues.
# Provide one or no parameters. If not specified the default values will be used.
def myFunction3(x = 2,y = 3):
print("You are in myFunction3")
print("x = ",x)
print("y = ",y)
return(x + y)
# ======================== Main Program =============================
myFunction1()
retValue = myFunction2(3,4)
print(retValue)
retValue = myFunction2(5,6)
print(retValue)
# This generates an error
#retValue = myFunction2(4)
#print(retValue)
retValue = myFunction3(3,4)
print(retValue)
retValue = myFunction3(5)
print(retValue)
# This does not generate an error
retValue = myFunction3()
print(retValue)