using functions in python.... help me! please : I had an assessment for my programming class about calculating insurance using functions. This is the code I was trying to get work but unfortunately I failed:

    import time
    
    def main():  
            print('Welcome to "Insurance Calculator" ')
            type_I, type_II, type_III = inputs()
            calculationAndDisplay()
            validation()
            time.sleep(3)       
              
    def inputs():
        try:
            type_I = int(input("How many  Type I policies were sold? "))
            type_II = int(input("How many  Type II policies were sold? "))
            type_III = int(input("How many  Type III policies were sold? "))          
        except ValueError:
            print("Inputs must be an integer, please start again")
            inputs()
    return type_I, type_II, type_III
    
    def calculationAndDisplay():
        type_I *= (500/1.1)
        type_II *= (650/1.1)
        type_III *= (800/1.1)
        print("The amount of annual earned for type_I is: $", type_I)
        print("The amount of annual earned for type_I is: $", type_II)
        print("The amount of annual earned for type_I is: $", type_III)
    
    def validation():
        cont = input("Do you wish to repeat for another year? [Y/N]: ")
        if cont == 'Y' or cont == 'y':
            main()
        elif cont == 'N' or cont == 'n':
            print('Thank You! ------ See You Again!')    
        else:
            print("I'm sorry, I couldn't understand your command.")
            validation()
    
    main()


I eventually got it to work by cramming all of the input, calculation, and display into one function. I just want to know how I could have made it work the way intended.... Thanks (this is my first time posting so I apologise if I made any mistakes while posting).