profit = 0 #Movie One: movieName = RikkiTikki #whatever viewerAgeOrTimeOfViewing = # either "youngerMatinee" or "adultNight" marketingCost = # float, in millions, subject to some constraints contentPopularity = # we decide. 1 = perfect talentPopularity = # we decide, 1 = perfect scriptQuality = # we decide, 1 = perfect directorSkill = # from charts rawTalent = [] #list of lead actors'/actresses' talent ratings. If no leads, just enter 5. marketFactor = # float that describes how much, ON AVERAGE, we think it will cost in adveretising to get one person into the theater. Keep couples and families in mind MPAArating = # either "G", "PG", "PG13", or "R" #MOVIE Object: viewerAgeOrTimeOfViewing = "youngerMatinee" #VAR (we need to decide this, probably based on "Audience" description) if viewerAgeOrTimeOfViewing == "adultNight": avgTicketPrice = 10 elif viewerAgeOrTimeOfViewing == "youngerMatinee": avgTicketPrice = 6 marketingCost = 85 * pow(10,6) #VAR (we need to decide this) print("Marketing Costs are: $" +str(marketingCost/pow(10,6)) + " million") contentPopularity = 1 #VAR (we need to decide this, 1 is perfect) talentPopularity = 1 #VAR (we need to decide this, 1 is perfect) viewerAppeal = contentPopularity * talentPopularity scriptQuality = 1 #VAR (we need to decide this, 1 is perfect) directorSkill = 1 #VAR rawTalent = [5] #VAR (lead actors/actresses only, from charts) ActingSkill = sum(rawTalent) / len(rawTalent) print ("For this movie, the average acting skill is: " + str(ActingSkill) + "/5") movieQuality = scriptQuality * directorSkill * ActingSkill marketFactor = 6 #VAR (we need to decide this, based on some research... how much does it cost to get a person into a theater? My # guess is that it costs less to market kids movies and/or couples movies because you get "2 for 1", or "4 for 1" with those kinds of moview with families or couples) marketing = marketingCost * 1/marketFactor #how many people you get per dollar of marketing $ spent. So if I spend $7 in marketingCost, and the marketFactor is 7, I expect to get 1 person rating = 1 #just declaring the rating variable MPAArating = "G" #VAR if MPAArating == "G": rating = 1.0 elif MPAArating == "PG": rating = 0.9 elif MPAArating == "PG13": rating = 0.65 elif MPAArating == "R": rating = 0.35 numOfViewers = viewerAppeal * movieQuality * marketing * rating revenue = numOfViewers * avgTicketPrice print ("Revenue is: $" + str(revenue/pow(10,6)) + " million") prodCost = 65 * pow(10,6) cost = prodCost + marketingCost print ("Costs are: $" + str(cost/pow(10,6)) + " million") profit = revenue - cost print ("I made $" + str(profit/pow(10,6)) + " million in profit!")
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question