Hi this is the problem we were given
"Write a Python program which asks the user to enter their gross pay and then calculates net pay based on the following deductions; PRSI 3%, Health Contribution 4% PAYE 41% U.S.C. 7% Hint: Deductions should be represented as global constants. Your program should include a number of functions i.e. a function to display instructions to the user; a function which takes input from the user and then calls a third function which calculates net pay (i.e. gross pay – deductions)"
Here is my effort
def instructions():
print ("Hello, and welcome to the programme")
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()
This "doDeductions" will not work I know it is wrong but I have no idea why
Any help would be greatly appreciated,
Thanks