Questions
Part (a) Write a number guessing game using System.Collections.Generic.Dictionary. Generate 10 distinct random numbers in the...

Part (a) Write a number guessing game using System.Collections.Generic.Dictionary.

  • Generate 10 distinct random numbers in the range of 1 to 20. Each random number is associated with a prize money (from 1 to 10000). Use a Dictionary to store the mapping between the random number and the prize money.
  • Ask user for two distinct numbers, a and b, both from 1 to 20; if a and b are not distinct, or out of range, quit the program
  • Lookup the prize money from both numbers and print out the sum via "You earned XXXX in total!". If the table does not contain the number, assume the prize money is 0.

e.g. Suppose we generate the following random numbers and penalty money:

1

3

4

6

7

11

12

13

19

20

333

234

12

500

1569

9900

23

2

588

23

If a user guess 5 and 3, we output "You earned 234 in total!"

If a user guess 1 and 13, we output "You earned 335 in total!"

If a user guess 1 and 1, quit

I have done the part(a) and the code is below.

For the part(b),

If the user has earned absolutely 0 amount of prize money, tell user which number would have given them the highest prize money:

e.g. "You are unlucky! If you guessed X, you would have won the most money!"

Otherwise, if the prize money is non-zero, after telling user the prize money he/she earned, print out the list of numbers that would have caused the player to have 0 prize money.

e.g. "You are so lucky! You could have 0 money if you have guessed …."

using System;

using System.Collections.Generic;

class GuessingGame{

    public static void Main(){

        Dictionary<int, int> prizes = new Dictionary<int, int>();

        Random rndGen = new Random(0);

        int num, money;

        int i=0;

        while(i<10){

            num = rndGen.Next(1, 20);

            money = rndGen.Next(1, 10000);

            if(!prizes.ContainsKey(num)){

                prizes.Add(num, money);

                i++;

            }

        }

        Console.Write("Enter two numbers(space separated): ");

        string[] line = Console.ReadLine().Split(' ');

        int num1 = Int32.Parse(line[0]);

        int num2 = Int32.Parse(line[1]);

        if(num1==num2 || num1<1 || num1>20 || num2<0 || num2>20)

            Console.WriteLine("quit");

        else{

            int prizeMoney = 0;

            if(prizes.ContainsKey(num1))

                prizeMoney += prizes[num1];

            if(prizes.ContainsKey(num2))

                prizeMoney += prizes[num2];

            Console.WriteLine("You earned {0} in total!", prizeMoney);

        }

    }

}

In: Computer Science

Ethical Dilemma Post an example of an ethical dilemma that you've encountered in your personal life...

Ethical Dilemma

Post an example of an ethical dilemma that you've encountered in your personal life or professional career (please do not include actual company names or individual names).

Summarize how you handled the situation and describe the eventual outcome in at least 300 words.

Reply to at least one other classmate's post.

In: Economics

Discuss how sound ethical practices and reasoning inform the objectivity expected in accounting and financial statements....

  • Discuss how sound ethical practices and reasoning inform the objectivity expected in accounting and financial statements.
  • How would you suggest improved ethical practices could be established and maintained in a given organization’s accounting?
  • What role does an individual “down-the-ranks” have in establishing and maintaining an ethical tone and company culture?

In: Accounting

This week we learned in part about bankruptcy law, which applies to companies and individual people....

This week we learned in part about bankruptcy law, which applies to companies and individual people.

Many companies are struggling financially now due to the extreme economic disruptions of COVID-19.

Do a brief Internet search and name one company or organization that is reportedly facing potential

bankruptcy as a result of Corona impacts.

In: Operations Management

Please explain in 5 sentences 1.For large scale IT project investments, like at Alcoa Chemical's, which...

Please explain in 5 sentences

1.For large scale IT project investments, like at Alcoa Chemical's, which IT valuation method is most appropriate and why? Explain Briefly

2. How has Data Analytics affected individual privacy rights? Illustrate your answer Briefly with example of company like Netflix or Amazon

In: Operations Management

4. Would both formal and informal networks be useful for NewSky services? Give one example of each and how each may provide collaborative opportunities. (Approx. 30 words).

Jacob and Margot are meeting again to discuss Jacob’s report on the current state of NewSky Services’ collaborative and networking practices, and his preliminary suggestions for action. Margot: ‘Firstly, thanks for all your hard work on this report, Jacob! I’ve taken it to our overseeing committee, who are very impressed with your suggestions.’ Jacob: ‘Great. I think we have a lot of room to expand our services and become more efficient through increased networking and participation. Where would you like me to go from here?’ Margot: ‘Based on your excellent work here, I’d like to put you in charge of our networking and collaborative practices as a project manager. What do you think we should do?’ Jacob: ‘Thanks very much! I’ll do my best. Taking this as a cohesive project is a good start, I think. I’d like to start by researching established networks and investigating potential collaborators.’ Margot: ‘I agree. Can you identify a number of established networks that could help us increase our services? There may also be collaborators locally that we could partner with.’ Jacob: ‘Absolutely. I’m excited to see where a commitment to networking and collaboration can take us.’

4. Would both formal and informal networks be useful for NewSky services? Give one example of each and how each may provide collaborative opportunities. (Approx. 30 words).


In: Nursing

3. Provide one example of a virtual network and describe how using the virtual network could increase NewSky Service’s collaborative activities. (Approx. 20 words).

Jacob and Margot are meeting again to discuss Jacob’s report on the current state of NewSky Services’ collaborative and networking practices, and his preliminary suggestions for action. Margot: ‘Firstly, thanks for all your hard work on this report, Jacob! I’ve taken it to our overseeing committee, who are very impressed with your suggestions.’ Jacob: ‘Great. I think we have a lot of room to expand our services and become more efficient through increased networking and participation. Where would you like me to go from here?’ Margot: ‘Based on your excellent work here, I’d like to put you in charge of our networking and collaborative practices as a project manager. What do you think we should do?’ Jacob: ‘Thanks very much! I’ll do my best. Taking this as a cohesive project is a good start, I think. I’d like to start by researching established networks and investigating potential collaborators.’ Margot: ‘I agree. Can you identify a number of established networks that could help us increase our services? There may also be collaborators locally that we could partner with.’ Jacob: ‘Absolutely. I’m excited to see where a commitment to networking and collaboration can take us.’

3. Provide one example of a virtual network and describe how using the virtual network could increase NewSky Service’s collaborative activities. (Approx. 20 words).


In: Nursing

6. Provide one way that Jacob could begin initiating relationships with other inter- and intra-sectoral professionals and organisations. (Approx. 30 words).

Jacob and Margot are meeting again to discuss Jacob’s report on the current state of NewSky Services’ collaborative and networking practices, and his preliminary suggestions for action. Margot: ‘Firstly, thanks for all your hard work on this report, Jacob! I’ve taken it to our overseeing committee, who are very impressed with your suggestions.’ Jacob: ‘Great. I think we have a lot of room to expand our services and become more efficient through increased networking and participation. Where would you like me to go from here?’ Margot: ‘Based on your excellent work here, I’d like to put you in charge of our networking and collaborative practices as a project manager. What do you think we should do?’ Jacob: ‘Thanks very much! I’ll do my best. Taking this as a cohesive project is a good start, I think. I’d like to start by researching established networks and investigating potential collaborators.’ Margot: ‘I agree. Can you identify a number of established networks that could help us increase our services? There may also be collaborators locally that we could partner with.’ Jacob: ‘Absolutely. I’m excited to see where a commitment to networking and collaboration can take us.’

6. Provide one way that Jacob could begin initiating relationships with other inter- and intra-sectoral professionals and organisations. (Approx. 30 words).


In: Nursing

8. Before undertaking a collaborative partnership with another organisation, why would Jacob have to define and document the type and level of collaboration?

Jacob and Margot are meeting again to discuss Jacob’s report on the current state of NewSky Services’ collaborative and networking practices, and his preliminary suggestions for action. Margot: ‘Firstly, thanks for all your hard work on this report, Jacob! I’ve taken it to our overseeing committee, who are very impressed with your suggestions.’ Jacob: ‘Great. I think we have a lot of room to expand our services and become more efficient through increased networking and participation. Where would you like me to go from here?’ Margot: ‘Based on your excellent work here, I’d like to put you in charge of our networking and collaborative practices as a project manager. What do you think we should do?’ Jacob: ‘Thanks very much! I’ll do my best. Taking this as a cohesive project is a good start, I think. I’d like to start by researching established networks and investigating potential collaborators.’ Margot: ‘I agree. Can you identify a number of established networks that could help us increase our services? There may also be collaborators locally that we could partner with.’ Jacob: ‘Absolutely. I’m excited to see where a commitment to networking and collaboration can take us.

8. Before undertaking a collaborative partnership with another organisation, why would Jacob have to define and document the type and level of collaboration?

(Approx. 50 words).




In: Nursing

If we accept that the goal of the financial manager is to create value for the...

If we accept that the goal of the financial manager is to create value for the stockholder, it follows that the financial manager must have a means of evaluating a prospective investment in terms of its likelihood of enhancing shareholder value. Different decision criteria may be used to evaluate proposed investments and we have gone through a pretty thorough review of most of them (NPV, IRR, Payback Period (straight and discounted), AAR, MIRR, PI). Our review included learning how to calculate each one as well as come to an understanding of the advantages and disadvantages of each. “Conventional wisdom” tells us that only the NPV criterion can always tell us if a particular project is a good investment and, if we have more than one project from which to choose, which one we should take. If this is the case, then why do so many financial managers in the “real world” make extensive use of the payback approach and, typically, do not take a discounted approach to payback? If you were to counsel a financial manager who is committed to using a payback criterion to evaluate prospective investments, would you take the opportunity to discuss other decision criteria that might be used? What advice would you provide as to whether he/she should continue using payback or if he/she should consider another approach and why?

In: Finance