예제 #1
0
 def projections():
     fullname = CLI.fullname_input()
     if fullname in donors.donors_collection_data.keys():
         projected_donor = {
             fullname: donors.donors_collection_data[fullname]
         }
         factor = CLI.mulfactor_input()
         min_donation = CLI.min_donation_input()
         max_donation = CLI.max_donation_input()
         donors.multiply_factor(factor, min_donation, max_donation,
                                **projected_donor)
예제 #2
0
 def thank_you():
     """Send a thank you letter"""
     fullname = CLI.fullname_input()
     if fullname.isalpha():
         if fullname == str("list"):
             donors.display_donors()
         elif fullname in donors.donors_collection_data.keys():
             amount = CLI.amount_input()
             donor.update_data_print_thanks(amount, fullname)
         else:
             try:
                 amount = CLI.amount_input()
                 donor.add_data_print_thanks(amount, fullname)
             except ValueError:
                 print("Enter the correct amount in integer")
     else:
         print("Enter the donor name correctly")