Need help combining all the results [closed]

sub_fee = 7
ad_fee = 2
vod_fee = 27.99

super_total = 0

def subscription_summary(months_subscribed, ad_free_months, video_on_demand_purchases, account_number):

    global super_total
      months_subscribed: How many months each account purchased.
      ad_free_months: How many months each account paid for ad free viewing.
      video_on_demand_purchases: How many Videos on Demand each account purchased.
    # Write your code here
    total_sub_fee = (sub_fee) * (months_subscribed)
    total_ad_fee = (ad_fee) * (ad_free_months)
    total_vod_fee = (vod_fee) * (video_on_demand_purchases)
    account_total = total_sub_fee + total_ad_fee + total_vod_fee
    print("Account", account_number, "made", "${:,.2f}".format(account_total), "total")
    print(">>> ", "${:,.2f}".format(total_sub_fee), "from monthly subscription fees")
    print(">>> ", "${:,.2f}".format(total_ad_fee), "from Ad-free upgrades")
    print(">>> ", "${:,.2f}".format(total_vod_fee), "from Video on Demand purchases")

    super_total += account_total

if __name__ == '__main__':
    print("Welcome to the Ada+ Account Dashboard")

    sub_lists = [[1,1,3],[2,0,0],[2,2,1]]
    for i in range(0,3):
        account_number = i + 1
        this_sub = sub_lists[i]
        subscription_summary(this_sub[0],this_sub[1],this_sub[2], account_number)

    print("super total : ",super_total)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top