Help me to solve REVENUE GROWTH ANALYSIS | Sololearn: Learn to code for FREE!

-3

Help me to solve REVENUE GROWTH ANALYSIS

2/5/2021 12:17:37 PM

Nafis Sadiq Bhuyan

13 Answers

New Answer

+5

Please show us your attempt so far.

+4

data = { "100-90": 25, "42-01": 48, "55-09": 12, "128-64": 71, "002-22": 18, "321-54": 19, "097-32": 33, "065-135": 64, "99-043": 80, "111-99": 11, "123-019": 5, "109-890": 72, "132-123": 27, "32-908": 27, "008-09": 25, "055-967": 35, "897-99": 44, "890-98": 56, "344-32": 65, "43-955": 59, "001-233": 9, "089-111": 15, "090-090": 17, "56-777": 23, "44-909": 27, "13-111": 21, "87-432": 15, "87-433": 14, "87-434": 23, "87-435": 11, "87-436": 12, "87-437": 16, "94-121": 15, "94-122": 35, "80-089": 10, "87-456": 8, "87-430": 40 } age = int(input()) list=list(data.values()) def rev(a): sal=0 for i in list: if i<a: sal = sal+5 else: sal = sal+20 return sal curr_rev=rev(18) pred_rev=rev(age) growth=int((pred_rev - curr_rev )*100/ curr_rev ) print(growth)

+3

This is my code: age = int(input()) teen = 0 lista = 0 for value in data.values(): if value < 18: teen += 1 for value in data.values(): if value < age: lista += 1 total_tickets = len(data) menores_edad = teen mayores_edad = total_tickets - teen original_price = 20 * mayores_edad + 5 * menores_edad menores_lista = lista mayores_lista = total_tickets - menores_lista total_price_discount = 5 * menores_lista + 20 * mayores_lista print(int((( total_price_discount - original_price) / original_price ) * 100))

+1

https://www.sololearn.com/Discuss/2682312/?ref=app

+1

data = { "100-90": 25, "42-01": 48, "55-09": 12, "128-64": 71, "002-22": 18, "321-54": 19, "097-32": 33, "065-135": 64, "99-043": 80, "111-99": 11, "123-019": 5, "109-890": 72, "132-123": 27, "32-908": 27, "008-09": 25, "055-967": 35, "897-99": 44, "890-98": 56, "344-32": 65, "43-955": 59, "001-233": 9, "089-111": 15, "090-090": 17, "56-777": 23, "44-909": 27, "13-111": 21, "87-432": 15, "87-433": 14, "87-434": 23, "87-435": 11, "87-436": 12, "87-437": 16, "94-121": 15, "94-122": 35, "80-089": 10, "87-456": 8, "87-430": 40 } age = int(input()) #your code goes here adult_ticket = 20 child_ticket = 5 def revenue(x): income = 0 for value in data.values(): if value < x: income += child_ticket else: income += adult_ticket return income original_discount_age = revenue(18) new_discount_age = revenue(age) revenue_growth = int(((new_discount_age - original_discount_age) / original_discount_age *100)) print(revenue_growth)

0

Abhay this is in python data structure course End of module project

0

Nafis Sadiq Bhuyan i still don't know where to search for it , probably copy paste the question with your code attempt so people can actually help you.

0

my attempt so far. data = { "100-90":25, "42-01":48, "55-09":12, "128-64":71, "002-22":18, "321-54":19, "097-32":33, "065-135":64, "99-043":80, "111-99":11, "123-19":5, "109-890":72, "132-123":27, "32-908":27, "008-09":25, "095-967":35, "897-99":44, "890-98":56, "344-32":65, "43-955":59, "001-233":9, "089-111":15, "090-090":17, "56-777":23, "44-909":27, "13-111":21, "87-432":15, "87-433":14, "87-434":23, "87-435":11, "87-436":12, "87-437":16, "94-121":15, "94-122":35, "80-089":10, "87-456":8, "87-430":40 } age = int(input("enter your age here:")) x = int(input("enter profit for original discount age:")) y = int(input("enter profit for age:")) i =x for value in data.values(): growth = ((y-x)/x)*100 print(int(growth)) please someone should guide me. i dont know how they expect me to know the money that will be made for the original discount age and what will be made for the current discount age

0

Thanks so much

0

Your welcome

0

This is my attempt so far , i don't know why it is considered wrong ? total = 0 data = data.values() for age in data: if age < 18: total += 5 else: total += 20 print (total) user_age = int(input()) new_total = total for age in data: if age < user_age: new_total += 5 else: new_total += 20 print (new_total) revenue_growth = (new_total / total )*100 print (revenue_growth)

0

This is my version in functional programming paradigm.... https://code.sololearn.com/c2xTaB112w37/?ref=app

-4

I can't find this code coach