#Program 3 – Auto Insurance
#Write a program that computes monthly insurance according to the provided schedule. 

#Student #:     W0465511
#Student Name:  Ashton Burgess

def main():
    #Greeting
    print("welcome to the Auto Insurance Calculator\n")


    #Hard Variables
    male="male"
    female="female"
    
    #Input Variables
    gender=(input("Are you'Male' or 'Female': ").lower())
    age=int(input("Enter your age: "))
    vehiclePrice=(float(input("Enter the purchase price of the vehicle: ")))
    rate=0
    months =12
    #if statments: if Male/Female   ,if ages: (nested if)
    
    if gender=="male":
        if age>=15 and age<25:
            rate=0.25 
            
        elif age>=25 and age<40:
            rate =0.17 
          
        elif age>=40 and age<70:
            rate=0.10
            
        else:
            print("\n Your age is not valid, you get Free Insurance!!!! :D")
            
    
    elif gender=="female":
        if age>=15 and age<25:
            rate=0.20
           
        elif age>=25 and age<40:
           rate=0.15  
           
        elif age>=40 and age<70:
            rate=0.10
            
        else:
            print("\n Your age is not valid, you win free Insurance.... :0")
    else:
        print("\n Your gender is not valid, You get Free Insurance :)")
    


    insurancePrice=(vehiclePrice * rate / months)
    
    #Final Print out
    print("\nYour monthly insurance will be ${0:.2f}".format(insurancePrice))
   
main()