Questions
Welcome to the Bruins Goalie Saves Analysis This program will calculate the percentage of saves for...

Welcome to the Bruins Goalie Saves Analysis This program will calculate the percentage of saves for a hockey goalie for 4 games after you have entered the games and saves for the goalie. Enter the number of goals for game #1: 3 Enter the number of saves for game #1: 22 The percent saves for game #1 is 88.0% Enter the number of goals for game #2: 4 Enter the number of saves for game #2: 33 The percent saves for game #2 is 89.2% Enter the number of goals for game #3: 1 Enter the number of saves for game #3: 16 The percent saves for game #3 is 94.1% Enter the number of goals for game #4: 0 Enter the number of saves for game #4: 22 The percent saves for game #4 is 100.0% The percent saves for 4 games for this goalie is 92.1% Thanks for using the Bruins Goalie Saves Analysis program.

In: Computer Science

Consider this table containing long run production data: Units of Capital, K Units of Labor, L...

Consider this table containing long run production data:

Units of Capital, K

Units of Labor, L

1

2

3

4

1

100.00

131.95

155.18

174.11

2

141.42

186.61

219.46

246.23

3

173.21

228.55

268.79

301.57

4

200.00

263.90

310.37

348.22

  1.             Does this production function exhibit a constant return to scale? Explain your answer.

  1.             How many units of output are produced with 4 units of labor and 2 units of capital?

  1.              Suppose the firm is using 3 units of capital and 2 units of labor and then decides to employ a third worker. What is the marginal product of the third worker?

  1.             Suppose the firm is using 1 unit of labor and 1 unit of capital. What is the marginal product of capital for K = 2, K = 3, and K = 4? Does return on capital diminish?

In: Economics

PYTHON: Write a function insertInOrder that takes in a list and a number. This function should...

PYTHON: Write a function insertInOrder that takes in a list and a number. This function should assume that the list is already in ascending order. The function should insert the number into the correct position of the list so that the list stays in ascending order. It should modify the list, not build a new list. It does not need to return the list, because it is modifying it.  
Hint: Use a whlie loop and list methods

lst = [1,3,5,7]

insertInOrder(lst, 2)
print(lst)
# Should print [1, 2, 3, 5, 7]

insertInOrder(lst, 4)
print(lst)
# Should print [1, 2, 3, 4, 5, 7]

insertOnOrder(lst, 8)
print(lst)
# Should print [1, 2, 3, 4, 5, 7, 8]

insertInOrder(lst, 0)
print(lst)
# Should print [0, 1, 2, 3, 4, 5, 7, 8]

In: Computer Science

Your express package delivery company is drawing up new zones for the location of drop boxes...

Your express package delivery company is drawing up new zones for the location of drop boxes for customers. The city has been divided into six zones. You have targeted seven possible locations for drop boxes. The list of which zones the drop boxes could serve is shown below

Possible Drop Box Location Can serve Zones
Location 1 2, 5, 6
Location 2 1, 3, 6
Location 3 2, 4, 5
Location 4 1, 2, 6
Location 5 3, 4, 5
Location 6 1, 3, 5
Location 7 2, 3, 4

Develop a model to find out the locations to use that provides the smallest number of locations yet make sure that each zone is covered by at least two boxes. Define variables if needed

In: Operations Management

A lab instructor asked her class of 30 college seniors how many beers or mixed drinks...

A lab instructor asked her class of 30 college seniors how many beers or mixed drinks they had last Saturday night that marked the beginning of the Spring Break. The data are presented below.

Female

Male

1

4

0

3

2

3

3

5

0

8

0

0

0

3

1

4

2

0

2

5

3

5

6

0

4

3

0

4

0

4

  1. Use SPSS to construct a frequency distribution table for the data for each of male and female.

In: Statistics and Probability

Warren Plastic, LLC complete these transactions in year 1 and year 2. Give general journal entries...

Warren Plastic, LLC complete these transactions in year 1 and year 2. Give general journal entries for them.

date yr
2/20 1 Purchased equipment for 40,000, signed an 8-month note, 7%.

2/28 1 Recorded the month's sales of 200,000, one-eighth cash, seven-eighths credit.
Sales tax rate is 5.25%

3/20 1 Sent Feb. sales tax to the state.

4/30 1 Borrowed $255,000 on a long-term note, 7% note payable
Annual interest is to be paid each year on 4-30, starting yr. 2.

10/20 1 paid off the note dated 2-20-yr 1

11/30 1 bought inventory at a cost of 12,500. Signed a 3 month 3.25% note.

12/31 1 Accrued warranty expense, estimated at 2% of 2,400,000 of sales

12/31 1 Accrued Interest on ALL outstanding notes.

2/28 2 Paid off the inventory note at maturity, including interest.

4/30 2 Paid the annual interest on the 255,000 note.

In: Accounting

A researcher randomly assigned individuals to one of three groups and noted their monthly intake of...

A researcher randomly assigned individuals to one of three groups and noted their monthly intake of broccoli (in pounds). At the 0.05 level of significance, can it be concluded that there is a difference in the means?

Group A

2.3 3.1 1.4 2.6 1.8

Group B

1.4 1.9 2.3 1.2

Group C

1.8 3.4 1.1 2.6

?1 = 5

?2 = 4

?3 = 4

̅̅̅
?1 = 2.24

̅̅̅
?2 = 1.7

̅̅̅
?3 = 2.225

?2 = 0.67 1

?2 = 0.50 2

?2 = 0.99 3

In: Statistics and Probability

Write a Python program to solve the 8-puzzle problem (and its natural generalizations) using the A*...

Write a Python program to solve the 8-puzzle problem (and its natural generalizations) using the A* search algorithm.

The problem. The 8-puzzle problem is a puzzle invented and popularized by Noyes Palmer Chapman in the 1870s. It is played on a 3-by-3 grid with 8 square blocks labeled 1 through 8 and a blank square. Your goal is to rearrange the blocks so that they are in order, using as few moves as possible. You are permitted to slide blocks horizontally or vertically into the blank square. The following shows a sequence of legal moves from an initial board (left) to the goal board (right).

     1 3            1      3        1 2 3         1 2 3        1 2 3

4 2 5   =>   4 2 5   => 4     5   => 4    5     => 4 5 6

7 8 6          7 8 6          7 8 6        7 8 6         7 8

initial           1 left              2 up               5 left            goal

Best-first search. Now, we describe a solution to the problem that illustrates a general artificial intelligence methodology known as the A* search algorithm. We define a search node of the game to be a board, the number of moves made to reach the board, and the previous search node. First, insert the initial search node (the initial board, 0 moves, and a null previous search node) into a priority queue. Then, delete from the priority queue the search node with the minimum priority, and insert onto the priority queue all neighboring search nodes (those that can be reached in one move from the dequeued search node). Repeat this procedure until the search node dequeued corresponds to a goal board. The success of this approach hinges on the choice of priority function for a search node. We consider two priority functions:

  • Hamming priority function. The number of blocks in the wrong position, plus the number of moves made so far to get to the search node. Intuitively, a search node with a small number of blocks in the wrong position is close to the goal, and we prefer a search node that have been reached using a small number of moves.

Manhattan priority function. The sum of the Manhattan distances (sum of the vertical and horizontal distance) from the blocks to their goal positions, plus the number of moves made so far to get to the search node

Input and output formats. The input and output format for a board is the board size N followed by the N-by-N initial board, using 0 to represent the blank square.

more puzzle04.txt

3

0 1 3

4 2 5

7 8 6

Solver puzzle04.txt

Minimum number of moves = 4

3

0 1 3

4 2 5

7 8 6

3

1 0 3

4 2 5

7 8 6

3

1 2 3

4 0 5

7 8 6

3

1 2 3

4 5 0  

7 8 6

3

1 2 3

4 5 6

7 8 0

more puzzle-unsolvable3x3.txt

3

1 2 3

4 5 6

8 7 0

Solver puzzle3x3-unsolvable.txt

Unsolvable puzzle

Your program should work correctly for arbitrary N-by-N boards (for any 1N < 128), even if it is too slow to solve some of them in a reasonable amount of time.

In: Computer Science

(1) Prompt the user to enter four numbers, each corresponding to a person's weight in pounds....

(1) Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Output the list. (2 pts)

Ex:

Enter weight 1: 236
Enter weight 2: 89.5
Enter weight 3: 176.0
Enter weight 4: 166.3

Weights: [236.0, 89.5, 176.0, 166.3]

(2) Output the average of the list's elements. (1 pt)

(3) Output the max list element. (1 pt)

Ex:

Enter weight 1: 236
Enter weight 2: 89.5
Enter weight 3: 176.0
Enter weight 4: 166.3

Weights: [236.0, 89.5, 176.0, 166.3]
Average weight: 166.95
Max weight: 236.0

(4) Prompt the user for a number between 1 and 4. Output the weight at the user specified location and the corresponding value in kilograms. 1 kilogram is equal to 2.2 pounds. (3 pts)

Ex:

Enter a list index (1 - 4): 3
Weight in pounds: 176.0
Weight in kilograms: 80.0

(5) Sort the list's elements from least heavy to heaviest weight. (2 pts)

Ex:

Sorted list: [89.5, 166.3, 176.0, 236.0]

This is what I have so far:

# FIXME (1): Prompt for four weights. Add all weights to a list. Output list.
weights = []
for i in range(4):
w = float(input("Enter weight "+str(i+1)+":"))
weights.append(w)
print("\nWeights:",weights)

# FIXME (2): Output average of weights.
avg = sum(weights) / float(len(weights))
print("Average weight:",avg)

# FIXME (3): Output max weight from list.
print("Max weight:",max(weights))

# FIXME (4): Prompt the user for a list index and output that weight in pounds and kilograms.
index = int(input("\nEnter a list index location (1 - 4): \n"))
print("Weight in pounds:",weights[index-1])
print("Weight in Kilograms:",weights[index-1]/2.2)

# FIXME (5): Sort the list and output it.
weights.sort()
print("\nSorted list:",weights)

Your output starts with

Enter weight 1:

Weights: [236.0]

Enter weight 2:

Weights: [236.0, 89.5].

Enter weight 3:

Weights: [236.0, 89.5, 176.0]

Enter weigt 4:

Weights: [236.0, 89.5, 176.0, 166.3]

Expected output starts with

Enter weight 1:

Enter weight 2:

Enter weight 3:

Enter weight 4:

Weights: [236.0, 89.5, 176.0, 166.3]

How do I fix this!?

In: Computer Science

Find the line of best fit. r = What is the SSE for this problem?

Movies

3 6 0 9 14 5 7 12 2 1 7 0 5 11 4

Books

7 0 18 0 1 4 5 0 6 2 10 9 2 2 0

Find the line of best fit.

r =

What is the SSE for this problem?

In: Statistics and Probability