def main():
    more = 'y'
    while (more == 'y'):
        print('If you want to manually enter object parameters\nmanually enter the instance attribute values.')
        print('Enter yours item.')
        more_item = 'y'
        while (more_item == 'y'):
            description = input('description: ')
            units_in_inventory = int(input('count of item: '))
            price = float(input('price: '))
            items = RetailItem(description, units_in_inventory, price)
            CashRegister().purchase_item(items)
            more_item = input("More item yes -'y', no -'any ch'.")
            if (more_item == 'y'):
                continue
            ready = input("Ready to pay? yes 'y', no 'any ch'")
            if (ready == 'y'):
                print()
                CashRegister().show_items()
                print('Numbers of items:', CashRegister().get_num_items())
                print('Total = $', '{:.2f}'.format(CashRegister().get_total()))
                print()
                print("Enter 'y' if you pay, no 'any ch'.")
                print("Enter 'c' if you want clean cart.")
                pay = input('Enter: ')
                if (pay == 'y'):
                    print('Paid.')
                    print('Product sent.')
                    print('Shopping cart empty.', CashRegister().clear())
                    break
                if (pay == 'c'):
                    print('we clear the shopping cart', CashRegister().clear())
            else:
                print('The product remained in cart.')
        more = input("Add more products? yes 'y', no 'any ch'")
def main():
    more = 'y'
    while (more == 'y'):
        print('If you want to manually enter object parameters\nmanually enter the instance attribute values.')
        print('Enter yours item.')
        more_item = 'y'
        while (more_item == 'y'):
            description = input('description: ')
            units_in_inventory = int(input('count of item: '))
            price = float(input('price: '))
            items = RetailItem(description, units_in_inventory, price)
            CashRegister().purchase_item(items)
            more_item = input("More item yes -'y', no -'any ch'.")
            if (more_item == 'y'):
                continue
            ready = input("Ready to pay? yes 'y', no 'any ch'")
            if (ready == 'y'):
                print()
                CashRegister().show_items()
                print('Numbers of items:', CashRegister().get_num_items())
                print('Total = $', '{:.2f}'.format(CashRegister().get_total()))
                print()
                print("Enter 'y' if you pay, no 'any ch'.")
                print("Enter 'c' if you want clean cart.")
                pay = input('Enter: ')
                if (pay == 'y'):
                    print('Paid.')
                    print('Product sent.')
                    print('Shopping cart empty.', CashRegister().clear())
                    break
                if (pay == 'c'):
                    print('we clear the shopping cart', CashRegister().clear())
            else:
                print('The product remained in cart.')
        more = input("Add more products? yes 'y', no 'any ch'")