Questions
There are 1000 potential travellers each day on the Cop enhagen - Oslo route, of which...

There are 1000 potential travellers each day on the Cop

enhagen

-

Oslo route, of which 500 are yuppies and 500 are hippies. Yuppies are willing to pay 700.00 for an unrestricted ticket

and 400.00 for a restricted ticket. Hippies are willing to pay 500.00 for an unrestricted ticket

and 300.00 for a restricted ticket. Travellers buy the ticket that gives them the highest

surplus (equal to the difference between the willingness to pay and the price), provided that

this surplus is positive. Among the following price policies, which one results in the highest

revenues?

a)

700.00 for an unrestricted ticket and 300.00 for

a restricted ticket.

b)

699

.00 for an unrestricted ticket and 299.00 for a restricted ticket.

c)

598.00 for an unrestricted ticket and 299.00 for a restricted ticket.

d)

498.00 for an unrestricted ticket and 199.00 for a restricted ticket.

In: Economics

Write a PHP script that: 1) Has an associative array with 10 student names and test...

Write a PHP script that:

1) Has an associative array with 10 student names and test scores (0 to 100). ie. $test_scores('John' => 95, ... );

2)Write a function to find the Average of an array. Input is an array, output is the average. Test to make sure an array is inputted. Use ARRAY_SUM and COUNT.

3)Output the test scores highest to lowest, print scores above the average in Green. Find a PHP Sort function for associative arrays, high to low. <font color='green'>text</font>

4)Output the test scores lowest to highest, print scores below the average in Red. Find a PHP Sort function for associative arrays, low to high. <font color='red'>text</font>

In: Computer Science

using c++. ALWAYS GRADE MY ANSWERS Write a program that reads students’ names followed by their...

using c++. ALWAYS GRADE MY ANSWERS

Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed by the test scores and the relevant grade. It should also find and print the highest test score and the name of the students having the highest test score.

Student data should be stored in a struct variable of type studentType, which has four components: studentFName and studentLName of type string, testScore of type int (testScore is between 0 and 100), and grade of type char. Suppose that the class has 20 students. Use an array of 20 components of type studentType. Your program must contain at least the following functions:

  • A function to read the students’ data into the array.
  • A function to assign the relevant grade to each student.
  • A function to find the highest test score.
  • A function to print the names of the students having the highest test score.

Your program must output each student’s name in this form: last name followed by a comma, followed by a space, followed by the first name; the name must be left justified. Moreover, other than declaring the variables and opening the input and output files, the function main should only be a collection of function calls.

Your program should accept no input and save the output to Ch9_Ex2Out.txt.

HERE IS :Ch9_Ex2Data.txt

Duckey Donald 85
Goof Goofy 89
Brave Balto 93
Snow Smitn 93
Alice Wonderful 89
Samina Akthar 85
Simba Green 95
Donald Egger 90
Brown Deer 86
Johny Jackson 95
Greg Gupta 75
Samuel Happy 80
Danny Arora 80
Sleepy June 70
Amy Cheng 83
Shelly Malik 95
Chelsea Tomek 95
Angela Clodfelter 95
Allison Nields 95
Lance Norman 88

In: Computer Science

If the number of the people in the labor force __________ and the number of people...

If the number of the people in the labor force __________ and the number of people working _________ then the unemployment rate must have ___________.

Select one:

a. Increases; declines; increased

b. Increases; increases; decreased

c. Increases; increases; increased

d. Decreases; declines; increased

In the Keynesian View, an increase in all of the below will increase the current period’s GDP, EXCEPT:

Select one:

a. Increase in the money supply

b. Increase in spending by consumers

c. Increase in saving

d. Increase in government spending on goods, such as office equipment.

So long as the loanable funds market clears (adjusts in response to changes in demand and supply), an increase in consumption by households will result in

Select one:

a. An increase in investment by businesses.

b. A decline in the production of capital goods.

c. A decline in the interest rate.

d. An increase in the production of capital goods.

According to the Keynesian View of monetary policy, the central bank should provide incentives to __________ during a recession and _________ during a period of unsustainable boom.

Select one:

a. the government to reduce its spending; to increase its spending

b. banks to reduce loans; to increase loans

c. consumers and businesses to increase spending; to lower spending

d. banks to hold more reserves, to hold less reserves

In the Austrian View, in a market economy without government intervention, if there is an unusually large number of unemployed workers looking for a job without success

Select one:

a. The market wage rate will increase, giving an incentive to many of the workers to accept a new job, and as a result, the labor market will clear rather quickly.

b. The situation will last for a long time, because of the downward stickiness of the wage rate, unless the government intervenes by increasing its spending.

c. The market wage rate will decline, making it profitable for some businesses to hire many of these workers, and as a result, the labor market will clear rather quickly.

d. Many of the businesses will become pessimistic about their future prospects, leading them to decrease their investment in capital goods, and as a result, the number of unemployed workers will become even larger.

In: Economics

A number is a palindromic prime if it is a prime number as well as a...

A number is a palindromic prime if it is a prime number as well as a palindromic number (ie. it is the same number when the digits are reversed).

For example, 10301 is a palindromic prime.

Write a Python program to ask the user how many palindromic primes they would like to compute, and output the values with a maximum of 10 values per line.

Your program should include the following functions:

isPrime(number) - returns True or False

isPalindrome(number) - returns True or False

reverse(number) - returns number reversed

Sample input/output: How many palindromic primes should be computed?: 25

2 3 5 7 11 101 131 151 181 191

313 353 373 383 727 757 787 797 919 929

10301 10501 10601 11311 11411

In: Computer Science

Is the number of calories in a beer related to the number of carbohydrates​ and/or the...

Is the number of calories in a beer related to the number of carbohydrates​ and/or the percentage of alcohol in the​ beer? The accompanying table has data for 35 beers. The values for three variables are​ included: the number of calories per 12​ ounces, the alcohol​ percentage, and the number of carbohydrates​ (in grams) per 12 ounces. Complete parts a through d.

Calories Alcohol% Carbohydrates
110 4.2 6.6
70 0.4 13.3
110 4.2 7
55 2.4 1.9
110 4.2 7
64 2.8 2.4
116 4.2 8
114 3.8 8.3
135 4.2 11.5
110 3.9 8.3
94 4.1 2.6
95 4.1 2.6
95 4.1 3.2
103 4.1 5
103 4.1 5.5
110 4.1 7
124 4.1 9.7
99 4.3 3.1
110 4.1 7.4
113 4.3 6.7
105 4.2 5.7
128 4.3 11.4
95 4.2 3.2
138 4.3 12.5
96 4.2 3.2
111 4.4 5.8
174 6.1 11.1
179 6.4 10.6
181 6.5 10.6
188 6.5 12.7
200 6.6 17
215 6.7 19.3
214 6.8 19.4
231 6.9 20
200 7 18

Perform a multiple linear regression​ analysis, using calories as the dependent variable and percentage alcohol and number of carbohydrates as the independent variables.

Let

Upper X 1X1

represent alcohol percentage and let

Upper X 2X2

represent the number of carbohydrates.

ModifyingAbove Upper Y with caret equals nothing plus left parenthesis nothing right parenthesis Upper X 1 plus left parenthesis nothing right parenthesis Upper X 2

In: Math

Sometimes probability statements are expressed in terms of odds. The odds in favor of an event...

Sometimes probability statements are expressed in terms of odds. The odds in favor of an event A are the following ratio.

P(A)/P(not A) = P(A)/P(Ac)

For instance, if P(A) = 0.60, then P(Ac) = 0.40 and the odds in favor of A are 0.60/ 0.40 = 6/4 = 3/2 , written as 3 to 2 or 3:2.

(a) Show that if we are given the odds in favor of event A as n:m, the probability of event A is given by the following. P(A) = n/n + m Hint: Solve the following equation for P(A). n/m = P(A)/1 − P(A)

n(1 − P(A)) = _____ (P(A))

n − nP(A) = ____P(A)

n = ____P(A) + nP(A)

n =_____ P(A)

n/n + m = P(A)

(b) A telemarketing supervisor tells a new worker that the odds of making a sale on a single call are 6 to 19. What is the probability of a successful call? (Round your answer to two decimal places.)

(c) A sports announcer says that the odds a basketball player will make a free throw shot are 3 to 5. What is the probability the player will make the shot? (Round your answer to two decimal places.)

When do creative people get their best ideas? USA Today did a survey of 966 inventors (who hold U.S. patents) and obtained the following information.

Time of Day When Best Ideas Occur
Time Number of Inventors
6 A.M.-12 noon
12 noon-6 P.M.
6 P.M.-12 midnight
12 midnight-6 A.M.
292
131
328
215

(a) Assuming that the time interval includes the left limit and all the times up to but not including the right limit, estimate the probability that an inventor has a best idea during each time interval: from 6 A.M. to 12 noon, from 12 noon to 6 P.M., from 6 P.M. to 12 midnight, from 12 midnight to 6 A.M. (Enter your answers to 3 decimal places.)

6AM-12PM 12PM-6PM 6PM-12AM 12AM-6AM

John runs a computer software store. Yesterday he counted 123 people who walked by the store, 52 of whom came into the store. Of the 52, only 23 bought something in the store. (Round your answers to two decimal places.)

(a) Estimate the probability that a person who walks by the store will enter the store.


(b) Estimate the probability that a person who walks into the store will buy something.


(c) Estimate the probability that a person who walks by the store will come in and buy something.


(d) Estimate the probability that a person who comes into the store will buy nothing.

In: Statistics and Probability

Is this the correct way to differentiate the sampling techniques? Is my cluster vs stratified correct?...

Is this the correct way to differentiate the sampling techniques? Is my cluster vs stratified correct?

Convenience Sampling- a sampling technique where you are sampling with the intent of saving time, money, or simply making the sample easier to get it over with

Simple Random Sample- Everybody is equally likely to get picked

Systematic Sampling- Sampling where there are exploitable patterns. Ex: Every 7th customer wins a car

Cluster Sampling- A population of interest is broken down into these things called clusters. We then make random clusters and sample everyone within those random clusters.

Stratified Sampling- A population of interest is broken down into strata (clusters with characteristics). Then, within EACH AND EVERY strata, a random sample is taken.

In: Statistics and Probability

Write a program that plays tic-tac-toe. The tic-tac-toe game is played on a 3 × 3...

Write a program that plays tic-tac-toe. The tic-tac-toe game is played on a 3 × 3 grid as shown below:

The game is played by two players, who take turns. The first player marks moves with a circle, the second with a cross. The player who has formed a horizontal, vertical, or diagonal sequence of three marks wins. Your program should draw the game board, ask the user for the coordinates of the next mark (their move), change the players after every successful move, and pronounce the winner.

This is the the code so far:

public static void main(String[] args) {
       Scanner in = new Scanner(System.in);
       int[][] board = new int[3][3];
      

   }

In: Computer Science

JAVA PROGRAM, Create the game "Rock, Scissor, Paper": Make the AI pick randomly. You need to...

JAVA PROGRAM, Create the game "Rock, Scissor, Paper":

  1. Make the AI pick randomly. You need to look up Random numbers in Java.
  2. First ask the user what language they want to play in. Choice 1 is English, but choice 2 can be whatever real language you want.
  3. Your first loop is making sure they enter good input.
  4. If there is a tie you don't give them the option to play again. They have to.
  5. Outer loop runs until they say they don't want to play again.
  6. Display how many wins and losses the player had only after they quit. Remember, variables are free. If you need the computer to keep track of something, make a variable.

In: Computer Science