In Unity with C#, I need to implement a dice simulator in my character generator(D&D). I have 6 sides of UI images(2D). With my code, I am able to roll and get the number in my console text(randomly).
But, I need help for rolling 5 dices, not the 1 dice. Also, I need to add all the three highest rolls with 5 dices and get a result in my display.
Ex) 1. Players must roll 5d6 and add the three highest rolls to compute each of the six Abilities. Note make all modifiers default to +2.
In: Computer Science
I. Answer part A,B, C and D.
1a)
Count the number of times a given char occurs in a given range of a String parameter (i.e. starting at a given start index, and up to but not including and end index). If end is greater than the length of the String, then the method should stop looking at the end of the String.
countCharsInRange("java", "v", 1, 2) → 0
countCharsInRange("java", "v", 0, 2) → 0
countCharsInRange("java", "v", 0, 3) → 1
1b)
Return a new String that removes all copies of the given char ch from the given String
removeChar("dog", "o") → "dg"
removeChar("cat", "o") → "cat"
removeChar("aaa", "a") → ""
1c)
Return the number of times the letter 'a' is directly followed by the letter 'b' in the given String.
countAB("abc") → 1
countAB("wxyz") → 0
countAB("bcaca") → 0
1d)
Return a new String that is a copy of the given String with each character copied the given number of times. Assume that n is 0 or more.
eachCharNTimes("abc", 2) → "aabbcc"
eachCharNTimes("xyz", 3) → "xxxyyyzzz"
eachCharNTimes("a", 5) → "aaaaa"
In: Computer Science
In baseball a teams success is often thought to be a function of the team's hitting and pitching performance. One measure of hitting performance is the number of home runs that team hits, and one measure of pitching performance is the earned run average for the teams pitching staff. It is generally believed that teams that hit more home runs and have a lower earned run average will win a higher percentage of games played. The following data show the proportion of games won, the number of home runs (HR), and the earned run average (ERA) for the 16 teams in the National League for the 2003 Major League Baseball season.
| Team | Won | HR | ERA | |||||
| Arizona | 0.519 | 152 | 3.857 | |||||
| Atlanta | 0.623 | 235 | 4.106 | |||||
| Chicago | 0.543 | 172 | 3.842 | |||||
| Cincinnati | 0.426 | 182 | 5.127 | |||||
| Colorado | 0.457 | 198 | 5.269 | |||||
| Florida | 0.562 | 157 | 4.059 | |||||
| Houston | 0.537 | 191 | 3.880 | |||||
| Los Angeles | 0.525 | 124 | 3.162 | |||||
| Milwaukee | 0.420 | 196 | 5.058 | |||||
| Montreal | 0.512 | 144 | 4.027 | |||||
| New York | 0.410 | 124 | 4.517 | |||||
| Philadelphia | 0.531 | 166 | 4.072 | |||||
| Pittsburgh | 0.463 | 163 | 4.664 | |||||
| San Diego | 0.395 | 128 | 4.904 | |||||
| San Francisco | 0.621 | 180 | 3.734 | |||||
| St Louis | 0.525 | 196 | 4.642 | |||||
| Determine the estimated regression equation that could be used to predict the proportion of games won given the number of team home runs. | ||||||||
1. Could someone please help me calculate the critical value of the model?
2. Also, I need to find the conclusion. I limited it down to these two. Could you please explain the reason for a or b?
a. Do not reject null hypothesis. there is not significant relationship between HR and wins
b. Do not reject null hypothesis. There is a significant relationship between ERA and wins
Thanks so much for your help. Will give you 5 stars
In: Statistics and Probability
The manager of a music store has kept records of the number of CDs bought in a single transaction by customers who make a purchase at the store. The accompanying table gives six possible outcomes and the estimated probability associated with each of these outcomes for the chance experiment that consists of observing the number of CDs purchased by a randomly selected customer at the store.
| Number of CDs purchased | 1 | 2 | 3 | 4 | 5 | 6 or more |
|---|---|---|---|---|---|---|
| Estimated probability | 0.30 | 0.30 | 0.15 | 0.15 | 0.06 | 0.04 |
(a) What is the estimated probability that the next customer
purchases three or fewer CDs?
(b) What is the estimated probability that the next customer
purchases at most three CDs?
How does this compare to the probability computed in part (a)?
greater than part (a)less than part (a) the same as part (a)
(c) What is the estimated probability that the next customer
purchases five or more CDs?
(d) What is the estimated probability that the next customer
purchases one or two CDs?
(e) What is the estimated probability that the next customer
purchases more than two CDs?
What are the answer to these?
In: Statistics and Probability
show in excel
In: Math
A sample of 16 Triple-A minor league baseball teams were selected for statistical analysis. The following data show the average attendance for the 16 teams selected. Also shown are the teams’ records; W denotes the number of games won, L denotes the number of games lost, and PCT is the proportion of games played that were won. Additionally, each teams’ major league association was given. The data are contained in the file named AAA.
|
Team Name |
League |
W |
L |
PCT |
Attendance |
|
Buffalo Bisons |
American |
66 |
77 |
0.462 |
8812 |
|
Lehigh Valley IronPigs |
National |
55 |
89 |
0.382 |
8479 |
|
Pawtucket Red Sox |
American |
85 |
58 |
0.594 |
9097 |
|
Rochester Red Wings |
American |
74 |
70 |
0.514 |
6913 |
|
Scranton-Wilkes Barre Yankees |
American |
88 |
56 |
0.611 |
7147 |
|
Reno Aces |
National |
80 |
62 |
0.563 |
5765 |
|
Charlotte Knights |
American |
63 |
78 |
0.447 |
4526 |
|
Durham Bulls |
American |
74 |
70 |
0.514 |
6995 |
|
Nashville Sounds |
American |
72 |
68 |
0.514 |
8823 |
|
Norfolk Tides |
American |
64 |
78 |
0.451 |
6286 |
|
Richmond Braves |
National |
63 |
78 |
0.447 |
4455 |
|
Columbus Clippers |
American |
69 |
73 |
0.486 |
7795 |
|
Indianapolis Indians |
National |
68 |
76 |
0.472 |
8538 |
|
Louisville Bats |
National |
88 |
56 |
0.611 |
9152 |
|
Toledo Mud Hens |
American |
75 |
69 |
0.521 |
8234 |
In: Statistics and Probability
A sample of 16 Triple-A minor league baseball teams were selected for statistical analysis. The following data show the average attendance for the 16 teams selected. Also shown are the teams’ records; W denotes the number of games won, L denotes the number of games lost, and PCT is the proportion of games played that were won. Additionally, each teams’ major league association was given. The data are contained in the file named AAA.
|
Team Name |
League |
W |
L |
PCT |
Attendance |
|
Buffalo Bisons |
American |
66 |
77 |
0.462 |
8812 |
|
Lehigh Valley IronPigs |
National |
55 |
89 |
0.382 |
8479 |
|
Pawtucket Red Sox |
American |
85 |
58 |
0.594 |
9097 |
|
Rochester Red Wings |
American |
74 |
70 |
0.514 |
6913 |
|
Scranton-Wilkes Barre Yankees |
American |
88 |
56 |
0.611 |
7147 |
|
Reno Aces |
National |
80 |
62 |
0.563 |
5765 |
|
Charlotte Knights |
American |
63 |
78 |
0.447 |
4526 |
|
Durham Bulls |
American |
74 |
70 |
0.514 |
6995 |
|
Nashville Sounds |
American |
72 |
68 |
0.514 |
8823 |
|
Norfolk Tides |
American |
64 |
78 |
0.451 |
6286 |
|
Richmond Braves |
National |
63 |
78 |
0.447 |
4455 |
|
Columbus Clippers |
American |
69 |
73 |
0.486 |
7795 |
|
Indianapolis Indians |
National |
68 |
76 |
0.472 |
8538 |
|
Louisville Bats |
National |
88 |
56 |
0.611 |
9152 |
|
Toledo Mud Hens |
American |
75 |
69 |
0.521 |
8234 |
In: Statistics and Probability
Problem 6.082 SI
Steam undergoes an isentropic compression in an insulated
piston–cylinder assembly from an initial state where
T1 = 120°C, p1 = 1 bar to a
final state where the pressure p2 = 50
bar.
Determine the final temperature, in °C, and the work, in kJ per kg
of steam.
In: Mechanical Engineering
3.0 kg of air initially occupying a volume of 0.01 m3 at a pressure of 95.0 bar expands in a piston-cylinder assembly isothermally and without irreversibilities until the volume is 0.05 m3. Using the Redlich-Kwong equation of state, determine the
1. temperature during the process, in K
2. final pressure, in bar
In: Mechanical Engineering
A piston-cylinder has a volume of 1 ft3 and contains a substance initially at 50 °F and 1 atm. The system is then heated until the temperature becomes 300 °F. Determine the total heat added (Btu) and final volume (ft3) assuming the substance is: a) water, b) copper, c) neon, d) air.
In: Mechanical Engineering