If you have downloaded the source code from this book's companion web site, you will find the following files in the Chapter 07 folder: • GirlNames.txt--This file contains a list of the 200 most popular names given to girls born in the United States from the year 2000 through 2009. • BoyNames.txt--This file contains a list of the 200 most popular names given to boys born in the United States from the year 2000 through 2009. Write a program that reads the contents of the two files into two separate lists, allows a user to input either a girl's name, a boy's name, or both, then tells the user whether the name(s) was/were popular between 2000 and 2009. First, the program should prompt the user to choose a girl's name, a boy's name, or both by entering either 'girl', 'boy', or 'both.' Once they have chosen, they should be able to input a name. If the name was a popular name, like Jacob or Sophia, the program should print "Jacob was a popular boy's name between 2000 and 2009." or "Sophia was a popular girl's name between 2000 and 2009." If the name was not a popular name, like Voldemort, the program should print "Voldemort was not a popular boy's name between 2000 and 2009." If the user chooses to input both a girl and boy's name, ask for the boy's name, then the girl's name, and print two statements in the form mentioned above on two separate lines, with the statement about the boy's name coming first. For example, if the user inputs Voldemort and then Sophia, print: Voldemort was not a popular boy's name between 2000 and 2009. Sophia was a popular girl's name between 2000 and 2009.
My code is working perfectly on boy and girl but it only reads that a name was not popular for boy and girl when running both.
def searchBoyName(boysList, name): #Searching for given boy name in list if name in boysList: #If found print("\n " + str(name) + " was a popular boy's name between 2000 and 2009. \n"); else: #If not found print("\n " + str(name) + " was not a popular boy's name between 2000 and 2009. \n"); def searchGirlName(girlsList, name): #Searching for given girl name in list if name in girlsList: #If found print("\n " + str(name) + " was a popular girl's name between 2000 and 2009. \n"); else: #If not found print("\n " + str(name) + " was not a popular girl's name between 2000 and 2009. \n"); def main(): #Reading data from files boysList = open("BoyNames.txt", "r"); girlsList = open("GirlNames.txt", "r"); #Initializing lists boyNames = []; girlNames = []; #Adding boys names for name in boysList: name = name.strip(); boyNames.append(name); #Adding girls names for name in girlsList: name = name.strip(); girlNames.append(name); #Accepting input from user type = input("\n Enter 'boy', 'girl', or 'both':"); #Searching for boy name if type == "boy": # Reading boy name bname = input("\n\n Input a boy name: "); # Searching searchBoyName(boyNames, bname) #Searching for girl name elif type == "girl": #Reading girl name gname = input("\n\n Input a girl name: "); #Searching searchGirlName(girlNames, gname); #Searching for both elif type == "both": #Searching for given boy name in list bname = input("\n\n Input a boy name: "); #Reading girl name gname = input("\n\n Input a girl name: "); if bname in boysList: #If found print("\n " + str(bname) + " was a popular boy's name between 2000 and 2009. \n"); elif bname not in boysList: #If not found print("\n " + str(bname) + " was not a popular boy's name between 2000 and 2009. \n"); #Searching for given girl name in list if gname in girlsList: #If found print("\n " + str(gname) + " was a popular girl's name between 2000 and 2009. \n"); elif gname not in girlsList: #If not found print("\n " + str(gname) + " was not a popular girl's name between 2000 and 2009. \n"); else: print("\n Invalid selection.... \n"); #Calling main function main();
In: Computer Science
THE DEMOTIVATION OF CEO PAY
How much did your CEO get paid this year? What did any CEO get
paid? You may not know the exact amounts, but you probably think
the answer is, “Too much money.” According to research from 40
countries that probed the thoughts of CEOs, cabinet ministers, and
unskilled employees, we all think leaders should be paid less.
Beyond that, we are clueless.
Where we err (fail to adhere to the proper or accepted standards)
can be calculated by an organization’s pay ratio, or the ratio
between CEO pay and average worker pay. In the United States, for
example, the average S&P 500 CEO is paid 354 times what the
lowest-ranking employee makes, for a ratio of 354:1 (eight times
greater than in the 1950s). Yet, U.S. participants in the study
estimated that the ratio between CEOs and unskilled workers was
only 30:1! Americans are not alone in making this gross
underestimate: Participants from Germany, for instance, estimated a
ratio of around 18:1 when the actual is closer to 151:1.
In general, people worldwide are unhappy with—and demotivated
by—their perception of inequity, even when their estimates of the
ratios are far below the reality. Taking the German example
further, the ideal ratio of CEO pay to unskilled workers as judged
by study participants was around 7:1. To put it all together, then,
people think the ratio should be 7:1, believe it is 18:1, and don’t
realize it is actually 151:1. For all the countries worldwide in
the study, the estimated ratios were above the ideal ratios,
meaning participants universally thought CEOs are overpaid.
How does this affect the average worker’s motivation? It appears
that the less a person earns, the less satisfied the person is with
the pay gap. Yet virtually everyone in the study wanted greater
equality. The ideal ratio, they indicated, should be between 5:1
and 4:1, whereas they thought it was between 10:1 and 8:1. They
believed skilled employees should earn more money than unskilled
individuals, but that the gap between them should be smaller.
No one in the United States would likely think the 354:1 ratio is
going to dip to the ideal of 7:1 soon, although some changes in
that direction have been suggested. Other countries have tried to
be more progressive. The Social Democratic Party in Switzerland
proposed a ceiling for the ratio of 12:1, but putting a cap into
law was considered too extreme by voters. No countries have yet
been able to successfully impose a maximum ratio.
Therefore, the job of restoring justice perceptions has fallen to
CEOs themselves. Many CEOs, such as Mark Zuckerberg of Facebook and
Larry Page of Google, have taken $1 annual salaries, though they
still earn substantial compensation by exercising their stock
options. In one extreme recent example, Gravity CEO Dan Price cut
his salary by $1 million to $70,000, using the money to give
significant raises to the payment processing firm’s employees.
Price said he expects to “see more of this.” In addition,
shareholders of some companies, such as Verizon, are playing a
greater role in setting CEO compensation by reducing awards when
the company underperforms.
there are 2 questions:
1- Read the case titled, “The Demotivation of the CEO Pay’ and
explain the following two questions:
a. Which motivation theory would you use to explain the above case?
Why
b. Can you solve the problem raised in the above case in all
countries? Why?
2- You are a management consultant in Oman. One of the Omani
domestic companies wants to expand to two different countries – one
in Asia and the other one in North America. The company is hiring
you to assist them in understanding ‘material culture’ and ‘social
culture’ so that they can create appropriate strategies for these
two countries.
a. Explain what is ‘material culture’ and ‘social culture’ to this
firm with appropriate framework
b. What are the problems this firm would face if 2(a) is not
handled properly?
In: Economics
Since 1987, Starbucks had transformed itself from a modest 9-store
operation in the Pacific Northwest into a powerhouse multinational
enterprise with 10,241 store locations, including some 2,900+
stores in 30 foreign countries. During Starbucks early years when
coffee was a 50-cent morning habit at local diners and fast food
establishments, skeptics had ridiculed the notion of $3 coffee as a
yuppie fad. But the popularity of Starbucks’ Italian-style coffees,
espresso beverages, teas, pastries and confections had made
Starbucks one of the great retailing stories of recent history and
the world’s biggest specialty coffee chain. In 2003, Starbucks made
the Fortune 500, prompting CEO Howard Schultz to remark, “It would
be arrogant to sit here and say that 10 years ago we thought we
would be on the Fortune 500. But we dreamed from day one and we
dreamed big.”
Starbucks reported revenues in fiscal 2005 of $ 6.4 billion, up
205% from $2.1 billion in fiscal 2000; after-tax profits in 2005
were $494.5 million, an increase of 423% from fiscal 2000 net
earnings of $94.6 million.
Having positioned Starbucks as the dominant retailer, roaster, and
brand of specialty coffees and coffee drinks in North America and
spawned the creation of the specialty coffee industry, management’s
long-term objective was now to establish Starbucks as the most
recognized and respected brand in the world. In 2005, new stores
were being opened at the rate of roughly 32 per week and management
expected to have 15,000 Starbucks stores open worldwide going into
2006. Believing that the scope of Starbucks long-term opportunity
had been underestimated, Schultz had recently increased the
targeted number of stores from 25,000 to 30,000 worldwide by 2013,
at least half of which were to be outside the United States. He
noted that Starbucks only had an overall 7% share of the coffee
drinking market in the United States and perhaps a 1% share
internationally. According to Schultz, “85that still leaves lots of
room for growth. Internationally, we are still in our infancy.”
Although coffee consumption worldwide was standing, coffee was
still the second most consumed beverage in the world, trailing only
water.
In fiscal 2006, Starbucks planned to open 1,800 net new stores
globally. Top management believed that it could grow revenues by
about 20 percent annually and net earnings by 20-25 percent
annually for the next 3 to 5 years. Howard Schultz and CEO Jim
Donald viewed China as a huge market opportunity, along with
Brazil, India, and Russia. To sustain the company’s growth and make
Starbucks one of the world’s preeminent global brands, Howard
Schultz believed that the company had to challenge the status quo,
be innovative, take risks, and adapt its vision of who it was, what
it did, and where it was headed. If the challenge of executing the
company’s strategy was met successfully, in all likelihood the
company’s best years lay on the strategic road ahead.
Require:
1) Referring back to the case, put forward some
suggestions for Starbucks given the Covid 19 issues at the moment
and what steps they can take Use the details from the following key
words Types of planning Leadership - Strategies Organizational
Structure
2) What would you suggest to Starbucks to do after the Covid 19 is
resolved and things go back to normal?
3) What is your evaluation of Starbucks social responsibility
strategy? Is it sincere or just something the company does and
talks about to create a good public image? Link it to: Challenges
for management in a global environment- recent changes in
management practices
4) Identify the SWOT of Starbucks. You can also add from your
experience and your knowledge of Starbucks. You can reflect from
Oman's retail store.
In: Operations Management
puts these designs into production by locating half its production facilities nearby in Spain, Portugal, and Morocco. It produces only a small quantity of each collection and is willing to experience occasional shortages to preserve an image of exclusivity. Clothes with a longer shelf life, like T-shirts, are outsourced to lower-cost suppliers in Asia and Turkey. With tight control on its manufacturing process, Zara can move more rapidly than any of its competitors and continues to deliver fresh styles to its stores every week. Logistics. Zara distributes all its merchandise, regardless of origin, from Spain. Its distribution process is designed so that the time from receipt of an order to delivery in the store averages 24 hours in Europe and 48 hours in the United States and Asia. Having 50 percent of its production facilities nearby is key to the success of this model. All Zara stores receive new shipments twice a week, and the small quantities of each collection entice consumers not only to return frequently but also to make purchase decisions more quickly. Because of its logistics and inventory policy, while an average shopper in Spain visits a main street store three times a year, shoppers to a Zara store average 17 trips. Some fans know exactly what day new shipments arrive and show up early to be the first in line, keeping the company’s sales strong throughout the year and even during slow economic times. The company also sells more products at full price—85 percent of its merchandise versus the industry average of 60 percent. Customers. Everything revolves around Zara’s customers. The retailer monitors customers’ changing needs, trends, and tastes through daily reports from shop managers about which products and styles have sold and which haven’t. Managers earn as much as 70 percent of their salaries from commission, so they have a strong incentive to stay on top of things. Zara’s designers don’t have to predict what fashion trends will be in the future. They react to customer feedback—good and bad—and if an idea fails, the line is withdrawn immediately. Zara cuts its losses and the impact is minimal due to the small quantities of each style produced. Stores. Zara does not run advertising campaigns. The retailer’s stores, in prestigioushigh-traffic locations around the world, are its key advertising element, featuring stylish and constantly changing window displays. Other retailers spend 3 percent to 4 percent of revenues on big brand-building campaigns, while Zara spends just 0.3 percent. The company has said it would rather use a percentage of revenue to open new stores than to advertise. Zara’s success comes from having complete control over all the parts of its business—design, production, and distribution. Louis Vuitton’s fashion director, Daniel Piette, described the company as “possibly the most innovative and devastating retailer in the world.” It has expanded aggressively throughout Europe as well as into emerging markets such as Asia, the Americas, and the Middle East, making sure it honors local tastes in each region. Zara was a latecomer to the Internet and launched its first online store only in 2011. However, the company now uses its Web site to test the waters before entering potential markets like China, Russia, and Canada with retail storefronts. While Zara has experience record sales as of late, it faces unique challenges ahead, including what to do in the United States, where obesity rates are much higher than in the rest of the world and roomy clothes are preferred to the slim fits and high fashion the company offers. It also needs to decide how to maintain its tight control on manufacturing as it expands throughout the world. Questions 1. Would Zara’s model work for other retailers? Why or why not? 2. What can Zara do to ensure successful growth around the world while maintaining the same level of speed and instant fashion?
In: Operations Management
Mention the physical states of the reactants and products of the following chemical reactions andbalance the equations. (AS1)
(a) C6H12O6 —> C2H5OH + CO2.
(b) NH3 + Cl2 —> N2 + NH4Cl.
(c) Na + 2H2O —> NaOH + H2.
In: Chemistry
3. In the 1981 federal budget, President Reagan proposes a new relationship between the states and the federal government in relationship to relief. Explain the changes in detail. What are the positive and negative aspects of the new relationship?
In: Economics
In: Biology
41. Calculate the energy of the first excited state of the helium atom, using time-independent disturbances, for degenerate states.
i'll give you a like so please help me with this
thank you!
In: Physics
The Laplace transform proves to be a highly valuable tool in electronic circuits analysis.
write 2 pages to states why it is valuable tool?
please remember to write the references whether are books or web sites
In: Electrical Engineering
What does Ferguson mean when he states, "History isn't one smooth, parabolic curve after another" (paragraph 3)? What evidence does he provide to support this comment?
In: Psychology