Bot program to count the products bought in the supermarket, with total sum.
def supermarket(): total_sum = 0 while True: product_name = input('please input product name') product_price = input('please input product price') if product_name == 'q': break total_sum += int(product_price) print('the total sum is', total_sum)