Questions
Write a ADT called in minStack that provides the following methods: • push() // inserts an...

Write a ADT called in minStack that provides the following methods:

• push() // inserts an element to the “top” of the minStack

• pop() // removes the last element that was pushed on the stack

• top () // returns the last element that was pushed on the stack

• min() // returns the minimum value of the elements stored so far

In: Computer Science

In the first five hockey games of the season, Pintsize Penguins had the following numbers of...

In the first five hockey games of the season, Pintsize Penguins had the following numbers of goals scored against them: 4, 6, 4, 8, 3.

Suppose you select two games at random from the first five games.

i. Calculate the probability that the number of goals conceded was 5 or less for the first game selected. Express your answer as a fraction in simplest form.

ii. Calculate the probability that the number of goals conceded was 5 or less for the second game selected, given that the number of goals conceded was 5 or less for the first game selected. Express your answer as a fraction in simplest form.

iii. Calculate the probability that the number of goals conceded was 5 or less for both selected games. Express your answer as a fraction in simplest form.

In: Statistics and Probability

You make a carnival game, where the player rolls two fair dice (in a single roll)...

You make a carnival game, where the player rolls two fair dice (in a single roll) and attempts to roll doubles (meaning both dice show the same number). The player puts down a dollar to play the game.

If the player loses, they lose their dollar.

If the player wins, they win $3 (and do not lose their original dollar). Answer the following (5 pts total).

  1. If you are running the game, what is the expected value of how much money you make running the game each time? Round to nearest cent.
  1. What is the standard deviation? Round to nearest cent.

  1. If you wanted to change the game to make it fair (so the expected value is zero), how could you change it?

In: Statistics and Probability

Teams A and B play in a basketball tournament. The first team to win two games...

Teams A and B play in a basketball tournament. The first team to win two games in a row or a total of three games wins the tournament. What is the number of ways the tournament can occur?

14

12

8

10

How many different rearrangements are there of the letters in the word BUBBLE?

60

100

120

80

How many ways are there to arrange all the words in this tongue twister?
CAN YOU CAN A CAN AS A CANNER CAN CAN A CAN?

12!/(6!*3!)

12!

12!/3!

12!/6!

Twelve points are located on the circumference of a circle. Lines are drawn to connect all possible pairs of points. How many lines are drawn?

66

144

132

24

In: Statistics and Probability

1.There are 15 teams in the NBA west- ern conference. Warriors are rst. Lakers are right...

1.There are 15 teams in the NBA west- ern conference. Warriors are rst. Lakers are right above the Kings in standings. The Thunder is higher than Clippers which is higher than Mavericks in standings. San Anto- nio is lower than the Nuggets. How many possible standings of these 15 teams can there be that satises all conditions mentioned?

2.John and Gina are playing a chess
match. Each game ends with a clear
winner. After 30 games John has
4 more wins than Gina. After 50
games they are tied. What is the pos-
sible number of outcomes (just look-
ing at who won each game) of those
50 games?

In: Statistics and Probability

Past records indicate that the probability of online retail orders that turn out to be fraudulent...

Past records indicate that the probability of online retail orders
that turn out to be fraudulent is 0.07. Suppose that, on a given
day, 19 online retail orders are placed. Assume that the number of
online retail orders that turn out to be fraudulent is distributed as a
binomial random variable.
a. What are the mean and standard deviation of the number of online
retail orders that turn out to be fraudulent?
b. What is the probability that zero online retail orders will turn
out to be fraudulent?
c. What is the probability that one online retail order will turn out
to be fraudulent?
d. What is the probability that two or more online retail orders
will turn out to be fraudulent?

In: Statistics and Probability

On September​ 11, 2002, a particular state​ lottery's daily number came up 9 - 1 -...

On September​ 11, 2002, a particular state​ lottery's daily number came up 9 - 1 - 1. Assume that no more than one digit is used to represent the first nine months.

​a) What is the probability that the winning three numbers match the date on any given​ day?​

b) What is the probability that a whole year passes without this​ happening? ​

c) What is the probability that the date and winning lottery number match at least once during any​ year? ​

d) If 27 states have a​ three-digit lottery, what is the probability that at least one of them will come up 3 - 1 - 0 on March 10​?

In: Statistics and Probability

A coin with probability of heads equal to .6 is tossed a first series of 10...

A coin with probability of heads equal to .6 is tossed a first series of 10 tosses.

Let X be the number of heads and let Y be the number of tails obtained.

(a) (1 POINT) Argue with a short sentence that the covariance Cov(X, Y) should be negative.
(b) (1 POINT) Find Cov(X,Y).

In a second series of tosses, the same coin is tossed as many times as the number of heads in the first series.

(c) (3 POINTS) Find the expected number of heads in the first and second series of tosses.

(d) (3 POINTS) Find the probability that the number of heads in the second series is 0.

In: Math

Find the useful power output (in W) of an elevator motor that lifts a 2500 kg...

Find the useful power output (in W) of an elevator motor that lifts a 2500 kg load a height of 30.0 m in 12.0 s, if it also increases the speed from rest to 4.00 m/s. Note that the total mass of the counterbalanced system is 10,000 kg—so that only 2500 kg is raised in height, but the full 10,000 kg is accelerated.

watts

What does it cost (in cents), if electricity is $0.0900 per kW · h?

cents

In: Physics

write a program called GradeCalculator that will calculate the grading statistics of a desired number of...

write a program called GradeCalculator that will calculate the grading statistics of a desired number of students.

Your program should start out by prompting the user to enter the number of students in the classroom and the number of exam scores. Your program then prompts for each student’s name and the scores for each exam. The exam scores should be entered as a sequence of numbers separated by blank space. Your program will also check for negative scores. If any score is negative, it will prompt the user to reenter the scores. You do not have to deal with inputs that are not numbers.  

For each student, calculate the student’s the average score, lowest score, highest score, letter grade, and the number of stars to give the student. Once the letter grade has been calculated, use it to calculate an appropriate number of stars the student will received. The letter grade is computed as followed: 90 to 100 is A, 80 and less than 90 is B, 70 and less than 80 is C, 60 and less than 70 is D, anything less than 60 is F. The number of stars is assigned as followed: A is 4 stars, B is 3 stars, C is 2 stars, D is 1 star, and F is 0 stars (no star). The program then displays the statistics about the student as shown in the sample run.

Before the program terminates, it prints the class statistics: average grade, lowest grade, highest. See sample output for format.

See sample run to have a better idea of what the program should do.

Grading:

program is expected to have comments.  Also comment code that is not obvious. Your program should be beautifully format, well designed, and efficient. Your program should perform as described. Try to match your output with the same run.

Sample Run:

Welcome to GradeCalculator!

Please enter the number of students: 2 Please enter the number of exams   : 3

---------------------------------------- Enter student 1’s name : Micheal Brown

Enter exam scores : 90 100 -80

Invalid exam scores, reenter: 90 100 80

Grade statistics for Micheal Brown   Average: 90   Letter grade: A   Micheal Brown gets 4 stars! ****

---------------------------------------- Enter student 2’s name: Will Smith

Enter exam scores: 80 95 70

Grade statistics for Will Smith   Average: 81.66   Letter grade: C   Will Smith gets 2 stars! **

---------------------------------------- Class statistics:   Average: 85.83   Lowest : 81.66   Highest: 90

Done. Good bye!

In: Computer Science