write a c# program that:
The file is using a very simple form of compression in which
there are no spaces, each word is separated by camel casing. For
Example, the string "TheCatWillRun" is parsed as "The Cat Will
Run".
*Now for the statistics*
Prints to the console the following statistics about the content in
the file retrieved above.
- How many of each letter are in the file
- How many letters are capitalized in the file
- The most common word and the number of times it has been
seen.
- The most common 2 character prefix and the number of occurrences
in the text file.
In: Computer Science
a. (T or F) There can be no code between a try-block and its associated catch-block.
b. (T or F) The reserved word throw is used to signal that an exception has occurred.
c. (T or F) The correct use of throw can be anywhere in a program; a try / catch structure is used only in class definitions.
d. (T or F) In C++, class is not a reserved word.
e. (T or F) Class attributes have no fixed type; their type can be changed during the program execution.
In: Computer Science
Please, write this code in c++. Using iostream and cstring library.
Write a function that will delete all words in the given text that meets more that one time. Also note than WORD is sequence of letters sepereated by whitespace.
Note. The program have to use pointer.
Input: First line contains one line that is not longer than 1000 symbols with whitespaces. Each word is not longer than 30 symbols.
Output: Formatted text.
example:
input: Can you can the can with can ?
output: Can you can the with ?
In: Computer Science
In an article in the Journal of Retailing, J. G. Blodgett, D. H. Granbois, and R. G. Walters investigated negative word-of-mouth consumer behavior. In a random sample of 201 consumers, 150 reported that they engaged in negative word-of-mouth behavior (for instance, they vowed never to patronize a retailer again). In addition, the 150 respondents who engaged in such behavior, on average, told 4.88 people about their dissatisfying experience (with a standard deviation equal to 6.11).
(a) Use these sample results to compute a 95 percent confidence interval for the proportion of all consumers who engage in negative word-of-mouth behavior. On the basis of this interval, would it be reasonable to claim that more than 70 percent of all consumers engage in such behavior? (Round your answers to 3 decimal places.)
The 95 percent confidence interval is [, ].
(Click to select)YesNo, the proportion could be (Click to
select)belowabove 0.70.
(b) Use the sample results to compute a 95 percent confidence interval for the population mean number of people who are told about a dissatisfying experience by consumers who engage in negative word-of-mouth behavior. On the basis of this interval, would it be reasonable to claim that these dissatisfied consumers tell, on average, at least three people about their bad experience? Note: t .025 = 1.98 when df =149. (Round your answers to 3 decimal places.)
The 95 percent confidence interval is [, ].
(Click to select)YesNo, the interval is (Click to select)abovebelow
3.
In: Statistics and Probability
Instructions:
• Answer the following questions, citing relevant legal authorities (law and cases) in support of your answer. Answers not supported by any legal authorities will not receive any credit.
• Legal problem-solving questions must be answered using the IRAC (Issue, Rule, Application and Conclusion) method taught in class.
• Reference sources must be cited in the text of the report (either in-text or footnotes, AND listed appropriately at the end of the assignment in a Reference List following the AGLC (Australian Guide to Legal Citation) style. • Failure to cite references when reproducing the work of someone else without attribution amount to plagiarism. Please read the attached Academic Integrity Policy for further guidance.
• All work must be submitted on Blackboard by the due date along with a completed Assignment Cover Page.
• Word counts for each answer are indicated after the question. Word count limits are strictly enforced. A deduction of two (2) marks will be imposed for every 50 words over the word count for either part of the report. Anything over the word count will not be read by your lecturer.
Question 3
You have been approached by some clients for advice about whether they should form a public or proprietary company for the purchase of a multi-million-dollar petroleum distributorship. What factors would you take into account when offering the clients advice?
(Maximum 450 words)
In: Accounting
QUESTION 7 - 6.3
I dislike using Microsoft Word and prefer to use other work processing software. However, nearly everyone that I work with uses Word, so I have to use this product when writing articles, books, and other research reports. For this reason, Microsoft Word holds a near-monopoly position in the word processor market. What is the barrier to entry that helps Microsoft maintain their market power?
|
Network externalities |
||
|
Input barrier |
||
|
Barrier created by the government |
||
|
Economies of scale |
QUESTION 8 - 6.3
Suppose there are 100 firms that sell athletic shoes and each has one percent of the market share. What is the HHI statistic for this market?
|
10 |
||
|
100 |
||
|
1000 |
||
|
10000 |
QUESTION 9 - 6.3
Suppose there are six firms in the breakfast cereal market. The four largest firms have 20 percent of the market share each, and the two smallest firms have 10 percent of the market share each. If one of the largest firms buys one of the smaller firms, what is the market share of the largest firm in the market after the buyout is concluded?
|
10 percent |
||
|
20 percent |
||
|
30 percent |
||
|
40 percent |
QUESTION 10 - 6.3
What happens to the profits of monopolistically competitive firms in the long run?
|
Profits remain positive and do not change over time |
||
|
Profits become negative |
||
|
Profits decline to zero |
||
|
Profits increase |
In: Economics
Question 1: Further Aspects Budgeting and Variance Analysis (15 marks)
YammiJuice manufactures the product ExoticJuice by using mango, apple and banana as ingredients. The company has provided you with the following cost and sales information which relates with the period just ended:
Standard cost per litre of SuperJuice:
|
Materials |
Kilograms |
Price per kilogram $ |
Total $ |
|
Apple |
150 |
40 |
6,000 |
|
Banana |
120 |
30 |
3,600 |
|
Mango |
80 |
60 |
4,800 |
|
Total |
350 |
14,400 |
|
|
Less Standard loss |
30 |
||
|
Standard yield |
320 |
Budgeted sales for the period are 40,960 litres at $160 per litre. There were no budgeted opening or closing inventory of SuperJuice. The actual materials used and costs were:
|
Materials |
Kilograms |
Price per kilogram $ |
Total $ |
|
Apple |
16,800 |
40.25 |
676,200 |
|
Banana |
16,500 |
20.80 |
343,200 |
|
Mango |
8,700 |
60.40 |
525,480 |
|
Total |
42,000 |
1,544,880 |
|
|
Less actual loss |
5,520 |
||
|
Actual yield |
36,480 |
All of the production of ExoticJuice was sold during the period for $160.75 per kilogram.
|
Required 1.1 Calculate material mix variance for each material and in total for SuperJuice. Show your workings Your answer: Show your workings here (Use table if necessay. Expand the space as required): Word count= |
|
Required 1.2 Calculate material yield variance in total for SuperJuice. Your answer (expand the space here): Show your workings here (Use table if necessay. Expand the space as required): Word count = |
|
Required 1.3 Explain your findings in requirement (1.1 & 2). In your explanations include what happened to material yield variance. [Word limit: 150 words. Note the word count at the end of your answer] Your answer (expand the space here): A Word count = |
In: Accounting
POST #3
I POST IT TWICE, DONT ANSWER TO BOTH POSTS. DO NOT COPY YOUR ANSWER TO BOTH POSTS. I NEED TWO DIFFERENT VIEW. Thanks
YOUR ANSWER WILL BE CHECK FOR PLAGIARISM.
***PLEASE DO NOT UPLOAD PHOTO FOR ANSWER
***** DO NOT COPY FROM ANY WEBSITE. USE YOUR OWN WORD. DO NOT ANSWER IF YOU ARE NOT COMFORTABLE FOR ANY RESON.
****USE YOUR OWN WORD
****USE YOUR OWN WORD
****USE YOUR OWN WORD
****USE YOUR OWN WORD
--------------------------------------------------------------------------------------------------------------
Discussion
What to Do
Please select from any one of the following activities. Make sure you answer all components of the question.
1. Herbert Spencer is credited with developing the “survival of the fittest” concept and the philosophic approach known as Social Darwinism. The idea behind this approach was societies evolve from primitive to civilized societies and that to help primitive societies interferes with the natural process of either evolving or becoming extinct. For example, nations like the United States have for decades intervened in sub-Saharan African countries in an attempt to fight AIDS and end poverty with little success. Discuss your thoughts on this subject and whether or not aid to poor societies actually helps them or simply creates dependency?
2. To understand peoples’ behavior, sociologists look at their social location in society. For this assignment, you will need to identify the corners in life you occupy by describing your job, income, education, gender, age, and race/ethnicity. Explain how each of these elements influences your self-concept and behavior. Does your social location impact you when you go out (i.e., socially or romantically)? When it comes to life chances and opportunities? Do you experience discrimination?
In: Economics
1)Check the correct statements.
Group of answer choices
a)If a security is underpriced, then the expected holding period return is above the market capitalization rate.
b)The value of the equity equals the present value of all future payouts (dividends plus repurchases).
c)The value of a share equals the present value of all future dividends per share.
d)If a firm reinvests its earnings at an ROE equal to the market capitalization rate, then its earnings-price (E/P) ratio is equal to the market capitalization rate.
e)The value of a share equals the present value of earnings per share assuming the firm does not grow, plus the NPV of all future investments.
2)Check the correct statements.
Group of answer choices
a)Everything else equal, the higher the expected dividend growth rate, the higher the P/E ratio.
b)Everything else equal, the higher the plowback ratio, the lower the P/E ratio.
c)Everything else equal, the higher the plowback ratio, the higher the P/E ratio.
d)Everything else equal, the higher the risk of the stock, the lower the P/E ratio.
e)Everything else equal, the higher the risk of the stock, the higher the P/E ratio.
Match the stock valuation model from the left column with the cash flows used in that model from the right column.
3) Group of answer choices
Total Payout Model
word box: Dividends per share Free Cash Flow to the Firm Dividends plus buybacks
Dividend Discount Model
word box: Dividends per share Free Cash Flow to the Firm Dividends plus buybacks
DCF Model
word box: Dividends per share Free Cash Flow to the Firm Dividends plus buybacks
4)
Match the stock valuation model from the left column with the discount rate used in that model from the right column.
Group of answer choices
Total Payout Model
word box: equity cost of capital weighted-average cost of capital
Dividend Discount Model
word box: equity cost of capital weighted-average cost of capital
DCF Model
word box: equity cost of capital weighted-average cost of capital
In: Finance
We were asked this:
Write a function that takes a list, and returns a list representing each word whose reverse is also in the list.
def find_reversals(lst: List[str]) -> List[str]:
Each pair, such as 'abut', 'tuba', should be represented by the first element encountered. Don't report the same pairs twice.
Don't list palindromes.
I wrote this, which might not be optimal but passes the unit test!
def find_reversals(lst):
#Place to save to
found_reversals=[]
#Make each string lowercase
for i in range(len(lst)):
lst[i]=lst[i].lower()
#Check the lowercase list
for i in range(len(lst)):
for j in range(i+1,len(lst)):
#Reverse the string using indexing feature ::-1
reversed_string=lst[j][::-1]
#If the original word on the list == the reversed STRING and is not
a palindrome
if(lst[i]==reversed_string and lst[i]!=lst[j]):
#If the string is not a duplicate item
if lst[i] not in found_reversals:
#See if a pair exists, then doesn't append in the list
if lst[i][::-1] not in found_reversals:
found_reversals.append(lst[i])
return found_reversals
The next problem wants us to recycle this...
Write a program that finds the reversals in Downey's word list.
List each pair only once, and only report the first word: List 'abut', but not 'tuba'
Do not list palindromes.
def find_reversals_in_file(fileName: str) -> List[str]:
If you try to open a file that does not exist, you should catch a FileNotFoundError and print an error message in your own words¶
I have this written:
def find_reversals_in_file(filename):
try:
with open(filename) as f:
#Use splitlines to remove the \n from the end of lines
f = f.read().splitlines()
#Place to save all words from file to
file_words = []
#Split the lines of words into multiple words using ' ' as a
delimiter
for x in f:
y = x.split()
for temp in y:
#Don't save any spaces
if len(temp.strip()) == 0:
continue
file_words.append(temp)
#If you can't open the file, return an error message.
except:
print("File does not exist.")
return [];
lst = find_reversals_in_file("words.txt")
result = find_reversals(lst)
print(f"There were {len(lst)} reversals")
for word in result:
print(word)
What am I missing here? Thank you in advance!
In: Computer Science