Hi I've recently been asked to do an assignment where I have to create a python program which asks the user to enter their gross pay and then calculates net pay based on a number of deductions. Deductions should be represented as global constants and the program should include a number of functions. I have no problem doing the assignment I just seem to be having difficulty with global constants and I keep getting an error saying that my function isnt defined. This is what I've come up with so far:
def instructions():
print ("Hello, welcome to the programme")
print ("Please follow the onscreen instructions")
def getOutput():
G = int(input("Enter gross income: "))
return G
def displayBreak():
print("")
print("Less deductions")
print("---------------")
def doDeductions():
Value=G*.03
Health=G*.04
Pay=G*.41
Social=G*.07
Net=G-Value-Health-Pay-Social
print("PRSI ",Value)
print("Health Contrb. ",Health)
print("PAYE ",Pay)
print("USC ",Social)
print("")
print("Net Pay ",Net)
print("Programme Complete")
################################################
instructions()
print("")
getOutput()
displayBreak()
print("")
doDeductions()