This is a ruby program, thank you Given a set of random integer numbers in a user-defined range, count the number of occurrences of each integer, and generate a histogram using # characters. The input and output of your program should match the following in format:
$ ./histogram.rb
How many random integer numbers do you want to generate?
10
Please input the maximum value for the random numbers:
9
The frequency of 1 | #
The frequency of 2 |#
The frequency of 3 |###
The frequency of 4 |#
The frequency of 6 |##
The frequency of 7 |###
The frequency of 8 |##
The frequency of 9 |####
Prompt the user to input the number of random integers to generate. Prompt the user to input the maximum value for the random integers. The minimum will always be 1 and the numbers generated should include the maximum value. Use the rand method available in Kernel to generate random numbers in a given range. The documentation for Random#rand is a bit more detailed than Kernel#rand, but it is the same method. Force the user input to be read from the line following the prompt in both cases. You must use an Array of the appropriate size to store the randomly generated numbers. In other words, if they ask for 50 random numbers, size the Array at 50. You must use a hash to store the frequency of each random number that is generated. HINT: Use a counting Hash. Do not generate lines in the histogram for numbers that are not found in the Array; note that there are no lines shown below for 5, 10, 16, and others. The numbers represented in the histogram should be in sorted order (low to high) when displayed. You must use an iterator method (which requires a code block) at least once in the program to iterate over the Array or the Hash (or both).
This is a ruby program, thank you
In: Computer Science
CISM - Assignment one
Capability Audit
One component only
Dear students:
In chapter one and two, we explained capabilities as business model component.
These capabilities are 8 components represented in the following 4 combinations
1- Analyze Process and Infrastructure
2- Evaluate People and Partners
3- Assess Organization and Culture
4- Evaluate Leadership and Governance
Provide a capability audit to one component only for a selected section or department in your organization – if you are working – or a well-known to you local organization – if you are not working.
Focus on how information and communication technology is effecting or effected by the capability factors.
- Work in groups of two/three, so that the work can be divided, and you work as a team.
- Apply the concept of integration and interconnectedness, when you come to asses and judge the organization capabilities.
- Critical eye is encouraged – No limit for quality or improvements.
- Size: not less than 1200 and not more than 1500 words.
- Use appropriate structure.
- Cover page, content page, and references are elements the enhance clarity.
- PPT slides, soft copy will be required.
- Presentation is required, any one of the group or the entire group may be asked to provide the presentation.
Any case from internet will be rejected.
i am working in directorate of human resources in sharjah government (united arab emirates)
this website of my orgnaization : https://www.sharjah.ae/registration-locations.aspx?Val=331
In: Accounting
Describe one type of cognitive bias (one or two sentences). Provide at least one specific example of how this type of bias could lead to suboptimal accounting decision making.
In: Accounting
Pina Corporation enters into a 6-year lease of equipment on
January 1, 2017, which requires 6 annual payments of $38,200 each,
beginning January 1, 2017. In addition, Pina guarantees the lessor
a residual value of $18,500 at lease-end. The equipment has a
useful life of 7 years. Assume that for Lost Ark Company, the
lessor, collectibility is reasonably predictable, there are no
important uncertainties concerning costs, and the carrying amount
of the equipment is $208,718.
Prepare Lost Ark’s January 1, 2017, journal entries.
In: Accounting
An education researcher claims that stipends for PhD students have increased from one academic year to the next. The table shows the PhD stipends (in dollars per year) for seven randomly chosen, different fields of study at various institutions in two consecutive years. Assume the populations are normally distributed. At α=0.05 , is there enough evidence to support the education researcher’s claim? Place commas between the 7 answers for parts a. and b. Field of Study 1 2 3 4 5 6 7 Stipend (First Year) 30,600 29,658 15,200 26,233 11,900 33,000 33,590 Stipend (Second Year) 32,850 30,770 19,800 27,100 11,000 33,000 30,312 d 〖b.) d〗^2 c.) Verify that the samples taken are random _____ and dependent._____ and that the populations are known to be normally distributed or n > 30. _____ Identify H_(0∶ _______________) and H_a: ____________ Find the mean of the differences, d ̅ and ∑▒d^2 . Place commas between the three answers. ∑▒d= __________________〖_〗d ̅ = (∑▒d)/n = _______________ ∑▒d^2 = _____________ Find the standard deviation of the diffe rences: s_d= √((∑▒〖〖d 〗^2- (∑▒d)^2/n〗)/n) Find the standardized test statistic, t. t = (d ̅- μ_d)/(s_d⁄√n) Find the number of degrees of freedom: d.f. = n - 1 For α=0.05, use Table 5 to identify t and find and shade the rejection region. Determine whether to reject or fail to reject H_(0 ). Interpret this decision in the context of the original claim.
In: Statistics and Probability
The sales volume for the last 7 years is given below by quarter in the following table:
|
Year |
Sales by Quarter |
|||
|
Q1 |
Q2 |
Q3 |
Q4 |
|
|
2013 |
289 |
410 |
301 |
213 |
|
2014 |
212 |
371 |
374 |
333 |
|
2015 |
293 |
441 |
411 |
363 |
|
2016 |
324 |
462 |
379 |
301 |
|
2017 |
347 |
520 |
540 |
521 |
|
2018 |
381 |
594 |
573 |
504 |
|
2019 |
444 |
592 |
571 |
507 |
Determine the values for the typical seasonal indexes and use them to obtain an estimate of demand for each quarter in 2020? Show all of your work.
In: Operations Management
The data in the table to the right represent the calories and sugar (in grams) in one serving of seven different types of breakfast cereals.
a. Compute and interpret the coefficient of correlation, r.
b. At the 0.05 level of significance, is there a significant linear relationship between calories and sugar?
Product Calories Sugar
Cereal 1
75
6
Cereal 2
105
1
Cereal 3 104
4
Cereal 4 114
5
Cereal 5 126
5
Cereal 6 189
10
Cereal 7
198 11
c) find t stat and P value and interpret.
In: Statistics and Probability
1.Determine whether the following statement would be the null or research hypothesis in an ANOVA: "there is not a difference between any of the means (μ1=μ2=μ3=μ4)”?
A.The research hypothesis
B.The null hypothesis
2.What is one of the limitations of ANOVA?
A. ANOVA is only useful with independent variables that have two categories.
B.Although it measures statistically different averages between or within groups, it has inappropriate measures for degrees of freedom.
C.Although it measures statistically different averages between or within groups, it does not distinguish which average is statistically different, only that there is a difference.
D.Variation is better captured by MANOVA.
3.ANOVA can be used with which level(s) of measurement of the dependent variable?
A.Interval-ratio only
B.Ordinal only
C.Nominal only
D.Interval-ratio and ordinal
E.Ordinal and Nominal
F.Nominal and interval-ratio
4.True or false, the F statistic is the ratio of between-group variation to within-group variation
5.True or false, the F distribution is not symmetrical but skewed to the right.
6.What is the statistic associated with ANOVA?
A.Chi-square statistic
B.Regression coefficient
C.Sum of squares statistic
D.F statistic
7.True or false, a larger obtained F statistic suggests greater between-group variance than within-group variance and increases the chances of rejecting the null
8.Regarding the direction of a relationship between two variables, choose the best description of a positive association.
A.A relationship between two variables where the observations of the variables move in opposite directions, e.g. as the values of one variable increase, values of the other variable decrease or vice versa. For example, alcohol consumption and the strength of the body’s immune system.
B.A relationship between two variables where the observations of the variables move in opposite directions, e.g. as the values of one variable decrease, values of the other variable also decrease. For example, exposure to nuclear radiation and incidence of cancers.
C.A relationship between two variables where the observations of the variables move in the same direction, which can be upward and downward e.g. as the values of one variable increase, values of the other variable also increase. For example, age and educational attainment.
D.A relationship between two variables where the observations of the variables move in the same upward direction, but not downward direction, e.g. as the values of one variable increase, values of the other variable only increase. For example, age and time.
In: Statistics and Probability
5. If the buyer of merchandise agrees to pay shipping costs, how
is the cost recorded?
6. If the seller of merchandise agrees to pay shipping costs, how
is the cost recorded?
7. Why would the seller of merchandise offer a discount for early
payment?
8. Payment terms are: 4/10, n/50. What does this mean?
9. If the buyer takes advantage of the discount offered, what will
happen to the cost of his/her merchandise?
10. When would the contra revenue account Sales Returns &
Allowances be used?
11. When would the contra revenue account Sales Discount be
used?
12. How will the two contra revenue accounts (in #10 and #11)
affect sales?
13. What kind of account is inventory?
14. How is the inventory account adjusted?
15. For each account below, indicate whether it is a permanent
account or temporary account:
a. Cost of Goods Sold
b. Sales Revenue
c. Sales Discount
d. Sales Returns & Allowances
e. Inventory
In: Accounting
A Mechanical design company produces an innovative design Component Z100 design of producing one(1) unit of component Z100 is provided in the bill of materials BOM which requires mix shown in Table Q3-1. The current monthly production of Component Z100 is consumption shown in Table Q3-2. Determine the following;
(i) Material usage variance;
(ii) Material price variance;
(iii) Total material cost variance;
(iv) Discuss at least two(2) importance of variance analysis in a manufacturing company
Table Q3-1
|
Materials |
Usage (units) |
Total cost (OMR) |
|
V |
5 |
17٫5 |
|
W |
3 |
37٫5 |
|
X |
8 |
52 |
|
Y |
2 |
40 |
Table Q3-2
|
Materials |
Usage (units) |
Total cost (OMR) |
|
V |
11،937 |
51،235 |
|
W |
6،854 |
94،382 |
|
X |
17،355 |
104،133 |
|
Y |
4،317 |
76،868 |
In: Statistics and Probability