Questions
5)A married couple from California is in the 31%Federal tax bracket and the 8%California tax bracket.They...

5)A married couple from California is in the 31%Federal tax bracket and the 8%California tax bracket.They are considering a 5¼%Hawaii municipal bond (Federaltax-free), a 5% California bond (doubletax-free)or a 7¾% corporate bond (fully-taxable). Which bond offers the highest after-tax interest rate?

A California investor is in the 35% Federal tax bracket and the 9% California tax bracket. He has the choice of a 5% Oregon municipal bond (Federaltax-free), a 4¼% California bond(double tax-free) or a 7½% corporate bond(fully-taxable). Which bond offers the highest after-tax interest rate?

Using annual compounding, what price would you predict for a 20-year, 7% bond priced to yield 5%?

Using annual compounding, what price would you predict for a 10-year, 6% bond priced to yield 9%?

In: Accounting

Comparing salaries from different times Consider golfers who led the Professional Golfers’ Association of America (PGA)...

Comparing salaries from different times

Consider golfers who led the Professional Golfers’ Association of America (PGA) in winnings at different points in time. Note that the winnings are nominal figures (unadjusted for inflation).

To convert the original earnings of Nicklaus, Watson, and Kite, use the formula for converting dollar figures from an earlier era into year 2017 U.S. dollars. Using those figures, fill in the following table, making sure to round your responses to the nearest U.S. dollar.

Year

Golfer

Nominal Winnings

U.S. CPI

Winnings in 2017 Dollars

(Dollars)

(1983 = 100)

1965 Jack Nicklaus 140,752 31.5 ?
1980 Tom Watson 530,808 82.4 ?
1981 Tom Kite 375,699 90.9 ?
2017 Justin Thomas 9,921,560 245.1 9,921,560

True or False: According to the previous table, the golfer with the highest PGA winnings in nominal dollars is not the same as the golfer with the highest PGA winnings after adjusting for inflation.

In: Economics

1.In a multiple regression model, the error term α is assumed to be a random variable...

1.In a multiple regression model, the error term α is assumed to be a random variable with a mean of:

a. Zero

b. ‐1

c. 1

d. Any value

2. In regression analysis, the response variable is the:

a. Independent variable

b. Dependent variable

c. Slope of the regression function

d. Intercept

3. A multiple regression model has:

a. Only one independent variable

b. More than one dependent variable

c. More than one independent variable

d. At least two dependent variables

4. A nonparametric version of the parametric analysis of variance test is the:

a. Kruskal‐Wallis test

b. Mann‐Whitney‐Wilcoxon test

c. Sign test

d. Wilcoxon signed‐rank test

5.When ranking combined data in a Wilcoxon signed‐rank test, the data that receives a rank of 1 is the:

a. Lowest value

b. Highest value

c. Middle value

d. Average of the highest and the lowest of value

In: Economics

Charlie kicks a soccer ball up a small incline. On the way up, ball’s acceleration has...

Charlie kicks a soccer ball up a small incline. On the way up, ball’s acceleration has magnitude |a| = 0.45 m/s2 and is directed in downhill direction. Charlie kicks the ball at the bottom of the incline and then immediately start to walk up the incline with constant speed. Charlie performs twi different trials. a) In the first trial, Charlie kicks the ball with initial speed v0 = 3.4 m/s. Charlie is 2.3-m behind the ball when the ball is at the highest point. What is the speed vC of Charlie? b) Charlie performs the second trial. He kicks the ball with unknown speed v 0 0 but walks with the same speed vC as in the first trial. Charlie is now 0.8 m behind the ball when the ball is at the highest point. What is the initial speed v 0 0 of the ball at the bottom of the hill? (Hint: You need to set-up a quadratic equation for v 0 0 ).

In: Physics

Charlie kicks a soccer ball up a small incline. On the way up, ball's acceleration has...

Charlie kicks a soccer ball up a small incline. On the way up, ball's acceleration has magnitude
jaj = 0:45 m/s2 and is directed in downhill direction. Charlie kicks the ball at the bottom of the
incline and then immediately start to walk up the incline with constant speed. Charlie performs
twi dierent trials.
a) In the first trial, Charlie kicks the ball with initial speed v0 = 3:4 m/s. Charlie is 2.3-m behind
the ball when the ball is at the highest point. What is the speed vC of Charlie?
b) Charlie performs the second trial. He kicks the ball with unknown speed v00
but walks with the same speed vC as in the first trial. Charlie is now 0.8 m behind the ball when the ball is at the
highest point. What is the initial speed v0 of the ball at the bottom of the hill? (Hint: You need to set-up a quadratic equation for v0).

In: Physics

Suppose we only have two consumer segments in the market. You are a marketer trying to...

Suppose we only have two consumer segments in the market. You are a marketer trying to decide the price for your product. The detailed information about the two segments are below, WTP stands for the maximum willingness to pay. Segment 1 Segment 2 Size 10 customers 20 customers WTP $3.00 $1.50 Usage 1 per customer 1 per customer Suppose the average cost per unit is $1. Please answer the following questions:

If the price is set as $3, which segment can you acquire? What will be your profit?

If the price is set as $1.5, which segment can you acquire?

What will be your profit?

If the objective is to have highest profit, how would you price?

If the objective is have highest market share, how would you price?

Is there anyway to price your product so we can get both, high market share and high profit?

In: Finance

Design a solution that requests and receives student names and an exam score for each. Use...

Design a solution that requests and receives student names and an exam score for each. Use one-dimensional arrays to solve this.

  • The program should continue to accept names and scores until the user inputs a student whose name is “alldone”.
  • After the inputs are complete determine which student has the highest score and display that student’s name and score.
  • Finally sort the list of names and corresponding scores in ascending order.

When you are done, printout the Code and, also the corresponding output produced. Upload both the txt file and the console output showing that your program run correctly.

Sample Input:

John   69

Alex 89

Billy 72

Sam   59

Serena 96

Alldone

Sample Output:

The student with the highest score is Serena with a score of 96

Sorted list

Serena 96

Alex 89

Billy 72

John   69

Sam   59

Please Write In JAVA Script

Thank you

In: Computer Science

Question 1 Electronegativity describes the ability of an atom to repel electrons. True False 2 points...

Question 1

Electronegativity describes the ability of an atom to repel electrons.

True

False

2 points

Question 2

Atomic radius increases as you move down a group of elements.

True

False

2 points

Question 3

The bottom left-hand corner of the periodic table contains elements with the highest electron affinity values.

True

False

2 points

Question 4

The distance from the center of the atom to the average position of the outermost electrons is referred to as the atomic mass of the element.

True

False

2 points

Question 5

A Ca2+ ion is smaller in size than a neutral Ca atom.

True

False

2 points

Question 6

Which of the following atoms would possess the largest atomic radius?

magnesium

lithium

potassium

francium

3 points

Question 7

Which of the following possesses the highest first ionization energy value?

fluorine

chlorine

oxygen

sulfur

3 points

Question 8

Which elements have their highest energy electrons in "s" atomic orbitals?

H, He, Ne

O, Se, Po

Na, Sr, Fr

Cs, Hf, Tl

3 points

Question 9

The 57th electron in an atom's electron configuration will be placed into which orbital?

5d

6d

4f

6p

3 points

Question 10

Every element whose symbol appears in Group 14 of the periodic table has an electron configuration that ends in "…p2."

True

False

2 points

Question 11

Transition metal elements are in the "d block" on the periodic table, because the electron configuration of every transition metal ends with electrons in "d" atomic orbitals.

True

False

Question 1

Electronegativity describes the ability of an atom to repel electrons.

True

False

2 points

Question 2

Atomic radius increases as you move down a group of elements.

True

False

2 points

Question 3

The bottom left-hand corner of the periodic table contains elements with the highest electron affinity values.

True

False

2 points

Question 4

The distance from the center of the atom to the average position of the outermost electrons is referred to as the atomic mass of the element.

True

False

2 points

Question 5

A Ca2+ ion is smaller in size than a neutral Ca atom.

True

False

2 points

Question 6

Which of the following atoms would possess the largest atomic radius?

magnesium

lithium

potassium

francium

3 points

Question 7

Which of the following possesses the highest first ionization energy value?

fluorine

chlorine

oxygen

sulfur

3 points

Question 8

Which elements have their highest energy electrons in "s" atomic orbitals?

H, He, Ne

O, Se, Po

Na, Sr, Fr

Cs, Hf, Tl

3 points

Question 9

The 57th electron in an atom's electron configuration will be placed into which orbital?

5d

6d

4f

6p

3 points

Question 10

Every element whose symbol appears in Group 14 of the periodic table has an electron configuration that ends in "…p2."

True

False

2 points

Question 11

Transition metal elements are in the "d block" on the periodic table, because the electron configuration of every transition metal ends with electrons in "d" atomic orbitals.

True

False

In: Chemistry

Lottery’s Powerball game, each ticket costs $2 and consists of two parts:--> Five distinct integers (i.e.,...

Lottery’s Powerball game, each ticket costs $2 and consists of two parts:--> Five distinct integers (i.e., no duplicates) between 1-69, inclusive • One integer (the “Powerball number”) between 1-26, inclusive. The Powerball number may or may not coincide with one of the previously chosen numbers. A ticket wins the jackpot if all five distinct numbers plus the Powerball number match the randomly drawn numbers. The matching of the five distinct numbers is done without regard to order. For example, a ticket with 54, 49, 3, 18, and 20 matches drawn numbers of 3, 54, 18, 20, and 49. In math, the set of five distinct numbers chosen by the player is known as a combination. The number of possible combinations of k items chosen from a set of n items is usually written as (pronounced “n choose k”) and is computable using this formula:   This concept should be familiar; it was discussed in an earlier lab. As mentioned then, calculating the factorials directly is not an efficient way to find n choose k. This is because the terms in (nk)! cancel some of the terms in n!, so there’s no need to compute those cancelled terms at all. A more efficient way to compute n choose k is this:      

The number of possible Powerball tickets can be computed by letting n = 69, k = 5, and multiplying the result of n choose k by 26 (the quantity of possible Powerball numbers):Number of possible tickets = 26   

plus one of m bonus numbers, we can compute the number of possible tickets like this. Number of possible tickets =   

The game settings (i.e., the values of k, n, and m above) can be chosen by the play.All of your code should be within a single class named Lottery.java.numPossibleTickets(int k, int n, int m-->This method should return the number of possible tickets in a lottery game that involves choosing k distinct integers from 1 to n (inclusive), plus one bonus integer from 1 to m (inclusive). Use equation (3) to compute this, and use the efficient technique of equation (2) when computing the value of n choose k. Because the number of tickets can be quite large, return it as a long value.getPlayerNumbers(int k, int n-->This method should get user input for k distinct integers between 1 and n (inclusive). The results should be returned in a 1D array of length k. Include input validation with loops to ensure that each input cannot be outside the range 1 to n, and also does not duplicate any previously entered value.getDrawnNumbers(int k, int n-->This method should simulate randomly drawing k distinct integers between 1 and n (inclusive). The results should be returned in a 1D array of length k. countMatches(int[] a, int[] b-->This method should return the number of elements in array a that also appear in array b. You may assume that both parameter arrays contain distinct elements. Here are some example arguments for this method and their expected return values:

a

b

Return Value

{1, 2, 3}

{3, 1}

2

{1, 2, 3}

{5, 7, -1}

0

  1. The main method should tie everything together. Call your previously written methods as necessary. Here’s a summary of what the main method should do:Get user input for how to set up the lottery game (i.e., get values for k, n, and m). Include input validation with loops to ensure that k ≥ 1, nk, and m ≥ 1.Show how many possible tickets exist for that game, and a single ticket’s chance of winning the jackpot.Get user input for t, how many tickets to buy. Include input validation with a loop to ensure that t ≥ 1.For each ticket, get user input for the k distinct numbers to play and the corresponding bonus number. Include input validation with loops to ensure that all the numbers are valid. (The distinct numbers should already be validated from the method getPlayerNumbers.)Once all tickets have been entered, simulate the lottery drawing.Find and show the “best” ticket(s). The “best” ticket is the one that matches more of the k distinct numbers than any other ticket. Matching the bonus number is used as a tiebreaker. For example, in a game that involves selecting 3 distinct numbers, here’s a hierarchy of possible tickets from best to worst:
    • All 3 numbers match, plus the bonus number (this wins the jackpot)
    • All 3 numbers match, without the bonus number
    • 2 of 3 numbers match, plus the bonus number
    • 2 of 3 numbers match, without the bonus number
    • 1 of 3 numbers match, plus the bonus number
    • 1 of 3 numbers match, without the bonus number
    • 0 of 3 numbers match, and the bonus number matches
    • 0 of 3 numbers match, and the bonus number doesn’t match In case two or more tickets tie for “best,” show all of them.
  • For the best ticket(s), show how many of the k distinct numbers match the drawn numbers, whether the bonus number matches, and whether the jackpot was won. To win the jackpot, all k distinct numbers and the bonus number must match the drawn numbers.The next pages have examples of how your completed program might look when running.Example program run (underlined parts indicate what the user enters) --> First, let’s set up the game!How many distinct numbers should the player pick? 4 OK. Each of those 4 numbers should range from 1 to what? 3Error - range must be at least 1 to 4 to have a valid game. Please try again: 4OK. And finally, the bonus number should range from 1 to what? 2-->There are 2 possible tickets in this game. Each ticket has a 50.0% chance of winning the jackpot. Let’s play, good luck!How many tickets would you like to buy? Error - must buy at least 1 ticket! Please try again: 1* Ticket #1 of 1 *Pick your 4 distinct numbers!Enter number 1 (must be 1-4, cannot repeat): 1Enter number 2 (must be 1-4, cannot repeat): 2 Enter number 3 (must be 1-4, cannot repeat): 1Error - you’ve already entered 1. Please try again.Enter number 3 (must be 1-4, cannot repeat): 3Enter number 4 (must be 1-4, cannot repeat): 1Error - you’ve already entered 1. Please try again.Enter number 4 (must be 1-4, cannot repeat):4Now pick your bonus number (must be 1-2): 3Error - number must be between 1 and 2. Please try again: 2Your tickets so far: --------------------

1               2              3              4              ||              Bonus: 2

The moment of truth has arrived! Here are the drawn numbers:

4               2              1              3              ||              Bonus: 2

Your best ticket(s):

1               2              3              4              ||              Bonus: 2

You matched 4/4 drawn numbers.You did match the bonus number.WOOHOO, JACKPOT!!

Example program run (underlined parts indicate what the user enters)First, let’s set up the game!How many distinct numbers should the player pick? 5OK. Each of those 5 numbers should range from 1 to what? 69OK. And finally, the bonus number should range from 1 to what? -1Error - range must be at least 1 to 1 to have a valid game. Please try again: 26There are 292201338 possible tickets in this game. Each ticket has a3.4222978130237034E-7% chance of winning the jackpot. Let’s play, good luck!How many tickets would you like to buy? -22Error - must buy at least 1 ticket! Please try again: 3* Ticket #1 of 3 *Pick your 5 distinct numbers!Enter number 1 (must be 1-69, cannot repeat): 77Error - number must be between 1 and 69. Please try again.Enter number 1 (must be 1-69, cannot repeat): 1Enter number 2 (must be 1-69, cannot repeat): 2Enter number 3 (must be 1-69, cannot repeat): 3Enter number 4 (must be 1-69, cannot repeat): 4Enter number 5 (must be 1-69, cannot repeat): 5Now pick your bonus number (must be 1-26): 22Your tickets so far: --------------------

1               2              3              4              5               ||              Bonus: 22

* Ticket #2 of 3 *Pick your 5 distinct numbers!Enter number 1 (must be 1-69, cannot repeat): 55Enter number 2 (must be 1-69, cannot repeat): 22Enter number 3 (must be 1-69, cannot repeat): 33Enter number 4 (must be 1-69, cannot repeat): 44Enter number 5 (must be 1-69, cannot repeat): 22Error - you’ve already entered 22. Please try again.Enter number 5 (must be 1-69, cannot repeat): 11Now pick your bonus number (must be 1-26): 19

Your tickets so far: --------------------

1               2              3              4              5               ||              Bonus: 22

55             22             33            44            11             ||              Bonus: 19

* Ticket #3 of 3 *Pick your 5 distinct numbers!Enter number 1 (must be 1-69, cannot repeat): 8Enter number 2 (must be 1-69, cannot repeat): 13 Enter number 3 (must be 1-69, cannot repeat): 2Enter number 4 (must be 1-69, cannot repeat): 17Enter number 5 (must be 1-69, cannot repeat): 29Now pick your bonus number (must be 1-26): 4

Your tickets so far: --------------------

1               2              3              4              5               ||              Bonus: 22

55        22        33        44        11        ||        Bonus: 19 8     13        2          17        29        ||        Bonus: 4

*****

The moment of truth has arrived! Here are the drawn numbers:

43            3               22            36            51             ||              Bonus: 4

Your best ticket(s):

1              2              3              4              5               ||              Bonus: 22

55            22             33            44            11             ||              Bonus: 19

You matched 1/5 drawn numbers. You did not match the bonus number.

Sorry, no jackpot this time. Really, did you expect anything else?

Try may be next time!!!!

In: Computer Science

Please use python3 Create the function team_average which has the following header def team_average(filename): This function...

Please use python3

Create the function team_average which has the following header

def team_average(filename):

This function will return the average number of games won by the Red Sox from a text file with entries like this

2011-07-02      Red Sox @  Astros       Win 7-5
2011-07-03      Red Sox @  Astros       Win 2-1
2011-07-04      Red Sox vs Blue Jays    Loss 7-9

This function should create a file object for the file whose name is given by the parameter filename.

If the file cannot be opened, use a try/except statement to print an error message and don't do any further work on the file.

The function will count the number of lines and the number of games the Red Sox won and use these values to compute the average games won by the team.

This average should be expressed as an integer.

Test Code

Your hw2.py file must contain the following test code at the bottom of the file

team_average('xxxxxxx')
print(team_average('red_sox.txt'))

For this test code to work, you must copy into your hw2 directory the file red_sox.txt from /home/ghoffman/course_files/it117_files.

To do this go to your hw2 directory and run cp /home/ghoffman/course_files/it117_files/red_sox.txt .

Suggestions

Write this program in a step-by-step fashion using the technique of incremental development.

In other words, write a bit of code, test it, make whatever changes you need to get it working, and go on to the next step.

  1. Create the script hw2.py using nano or some other Unix text editor.
    Enter the header for team_average into the script.
    Under this header write the Python statement pass.
    Copy the test code above into the script.
    Make the script executable.
    Run the script.
    If all you see is None, proceed to the text step.
  2. Remove the pass statement.
    In its place write the function code to open the file for reading.
    This code should print an error message and exit the function if the file cannot be opened for reading.
    Run the script.
    You should see
    Cannot open xxxxxxx
    None
  3. Modify the function so it prints out the lines of the file.
  4. Modify the function to use the split string method to create a list from the from the different fields in a line. Print this list.
  5. For each line, get the value of the won_lost field and print it.
    This field is second to last entry in the list you created by using the split method.
    The lists will have different lengths, since some team have a single word as their name, and others have two words, e.g. White Sox.
    The easiest way to get the second to last field is to use a negative index.
    Print the value of won_lost field.
  6. Comment out or delete the line that prints the won_lost field.
    Initialize an accumulator to count the number of lines.
    Increment this accumulator inside the for loop.
    Return the total number of lines.
  7. Initialize an accumulator to count the number of Red Sox wins.
    In the for loop increment this accumulator every time the value of won_lost is "Win".
    Return the number of games won.
  8. Change the return statement so it returns integer percent of the number of games the Sox won.

Output

When you run the completed script, you should see

Error: Unable to open xxxxxxx
76

In: Computer Science