The code below gives the desired result. However, what is the alternative to using global variables? I have to use more than one function.
#Initialising
feeOne =0.0
feeTwo =0.0
country = ""
rate=""
total =0.0
sFee = 10.0
def dets():
global sFee, feeOne, feeTwo
country=input("What is your country? ")
rate=input("What is your rate? High or Low: ")
if country =="UK":
feeOne = 10.0
else:
feeOne = 20.0
if rate=="High":
feeTwo = 10.0
else:
feeTwo = 20.0
def total():
total = (sFee + feeOne) * feeTwo
print(total)
dets()
total()