/* Assignment : Complete this javascript file according instructions in comments. */ // 1) Create a for loop that loops through its code block 10 times // In the first statement, set the variable i equal to zero // In the second statement, tell the loop to execute while i is less than ten // In the third statement, increment i by one each time the loop executes // In the code block of the loop, print the variable i to the console // 2) Create an array named foods and put your 5 favorite foods // in the array as items. // 5 fav foods = sushi, ramen, korean bbq, pizza, wings // Create a for / in loop that will loop through the items in the foods array // Print a favorite food item to the console each time the loop executes // When finished, you should have printed each favorite food item to the console // 3) Create a variable x and set it equal to 50. // Create a while loop that executes while x is greater than zero. // Print the value of x to the console every time the loop executes. // Decrement the value of x by one every time the loop executes. // Your loop should count backwards from 50 to 1 and print each number in the // console. // 4) Create a variable named myNum and set it equal to 10. // Create a while loop that executes while myNum is less than 5. // In the loop, print the value of myNum to the console. // Below that loop, create a do / while loop. // Set the while condition the same as first while loop. // Print the value of myNum to the console in the loop. // Comment below your loops to explain the outcome. /* multi-line comment */ // 5) Create a variable named x and set it equal to zero. // Create a while loop that executes while x is less than ten. // In the code block of the loop, set x equal to a random number between // one and ten using the previous random number formula we learned with // the Math object. // After assigning x the random number, print the value of x to the console. // The loop should continue to execute until the value of x equals 10.
In: Computer Science
A diverging lens has a focal length of 14.0 cm. Locate the images for each of the following object distances. For each case, state whether the image is real or virtual and upright or inverted, and find the magnification. (a) 28.0 cm q = cm (b) 14.0 cm q = cm
In: Physics
Please (a) in any industry of your own selection, please identify a dilemma involving the use of overseas suppliers in a US company’s supply chain. The dilemma has to involve a difficult decision where it is hard to please both investors and customers; (b) discuss your alternatives to solve the dilemma; (c) recommend the best alternative; (d) explain why the recommendation provides a comprise that manages to make, to a reasonable degree even though not perfectly, both investors and customers happy.
In: Operations Management
c++ Create a program that creates a sorted list from a data file. The program will prompt the user for the name of the data file. Create a class object called group that contains a First Name, Last Name, and Age. Your main() function should declare an array of up to 20 group objects, and load each line from the input file into an object in the array. The group class should have the following private data elements: first name ,last name age The group class should have the following functions: Constructor(s) Destructor - optional Get - read first name, last name, and age from an input stream Put - write last name, first name, and age to an output stream The group class should have the following operators: > < == compare the group to another group, using Last name, First name, then age, and return a bool Your program should do the following: Prompt the user for the name of the file Open the file Read the data into the array of group objects (maximum size 20) Close the file Sort the array Display the array ============== text file Ann ember 70 jacob Mark 68 David smith 45 Frank lee 37 John doe 30 Kathleen honor 34 bob ember 42 bob ember 13 Richard start 47 Susan hox 36 Expert Answer
In: Computer Science
Using the info below, answer the next following questions:
A survey of the mean number of cents off that coupons give was conducted by randomly surveying one coupon per page from the coupon sections of a recent San Jose Mercury News. The following data were collected: 20¢; 75¢; 50¢; 65¢; 30¢; 55¢; 40¢; 40¢; 30¢; 55¢; $1.50; 40¢; 65¢; 40¢. Assume the underlying distribution is approximately normal.
(a) Determine the sample mean in cents (Round to 3 decimal places)
(b) Determine the standard deviation from the sample . (Round to 3 decimal places)
(e) Construct a 95% confidence interval for the population mean worth of coupons. Use a critical value of 2.16 from the t distribution.
What is the lower bound? ( Round to 3 decimal places )
(f) Construct a 95% confidence interval for the population mean worth of coupons .
What is the upper bound? ( Round to 3 decimal places )
In: Math
4. Taxes paid for a given income level
Charles is getting ready to do his taxes. He is single and lives in San Diego. Charles earned $300,000 in 2011. He reviews the following table, which shows the IRS tax rates for a single taxpayer in 2011.
On Annual Taxable Income... |
The Tax Rate Is... (Percent) |
|
Up to $8,500 | 10 | |
|
15 | |
|
25 | |
|
28 | |
|
33 | |
|
35 |
Based on the IRS table, Charles calculates that his marginal tax rate is ______ when his annual income is $300,000.
Charles calculates that he owes ______ in income taxes for 2011.
Charles then calculates that his average tax rate is ______ , based on the annual income level and the amount of taxes he owes for 2011.
After figuring out what he owes in taxes in 2011, Charles decides to ask an accountant for tax advice. The accountant claims that he has found a legal way to shelter $2,000 of taxable income from the federal government.
The maximum amount that Charles is willing to pay to learn this strategy and reduce his taxable income by $2,000 is ____ . (Hint: Sheltering some income means finding a legal way to avoid being charged income tax on that income. For example, someone who has $50,000 in income and shelters $10,000 pays income tax on only $40,000.)
In: Economics
THE FOLLOWING MUST BE CODED IN C THE FOLLOWING MUST BE CODED IN C
THE FOLLOWING MUST BE CODED IN C THE FOLLOWING MUST BE CODED IN C
Write a program that demonstrates handling pointers. Create two integer variables m and n, and two pointers, pm pointing to m, and pn pointing to n.
Produce the following output:
Address of m: 0x7ffcc3ad291c
Value of m: 29
Address of n: 0x7ffcc3ad291d
Value of n: 34
Now pm is pointed to m by assigning the address of m to pm
Address of pointer pm: 0x7ffcc3ad2100
Value of pointer pm: 0x7ffcc3ad291c
Content of pointer pm (dereferencing): 29
Now pn is pointed to n by assigning the address of n to pn
Address of pointer pn: 0x7ffcc3ad2101
Value of pointer pn: 0x7ffcc3ad291d
Content of pointer pn (dereferencing): 34
Thank you!
In: Computer Science
Select what you think is the proper blending of promotion methods in the state of North Carolina for the market-leading company in any industry of your own choice.
In: Operations Management
4. (a) In a fraud detection system a number of different algorithms are working indepen- dently to flag a fraudulent event. Each algorithm has probability 0.9 of correctly detecting such an event. The program director wants to be make sure the system can detect a fraud with high probability. You are tasked with finding out how many different algorithms need to be set up to detect a fraudulent event. Solve the following 3 problems and report to the director. [Total: 18 pts] (b) Suppose n is the number of algorithms set up. Derive an expression for the probability that a fraudulent event is detected. (6 pts) (c) Using R, draw a plot of the probability of a fraudulent event being detected versus n, varying n from 1 to 10. (6 pts) (d) Your colleague claims that if the company uses n = 4 algorithms, the probability of detecting the fraudulent event is 0.9999. The director is not convinced. Generate 1 million samples from Binomial distribution with n = 4, p = 0.90 and count the number of cases where Y = 0. Report the number to the director. (6 pts)
In: Math
Explain the importance of data collection and information research on a project outcome.
In: Civil Engineering
The St. Lucia Blood Bank, a private charity partly supported by government grants, is located on the Caribbean island of St. Lucia. The blood bank has just finished its operations for September, which was a very busy month due to a powerful hurricane that hit neighboring islands causing many injuries. The hurricane largely bypassed St. Lucia, but residents of St. Lucia willingly donated their blood to help people on other islands. As a consequence, the blood bank collected and processed over 20% more blood than had been originally planned for the month.
A report prepared by a government official comparing actual costs to budgeted costs for the blood bank appears below. Continued support from the government depends on the blood bank’s ability to demonstrate control over its costs.
St. Lucia Blood Bank Cost Control Report For the Month Ended September 30 |
|||||||
Actual Results | Planning Budget | Variances | |||||
Liters of blood collected | 520 | 400 | |||||
Medical supplies | $ | 8,040 | $ | 6,600 | $ | 1,440 | U |
Lab tests | 4,904 | 4,720 | 184 | U | |||
Equipment depreciation | 3,850 | 3,500 | 350 | U | |||
Rent | 1,500 | 1,500 | 0 | ||||
Utilities | 840 | 750 | 90 | U | |||
Administration | 12,200 | 11,660 | 540 | U | |||
Total expense | $ | 31,334 | $ | 28,730 | $ | 2,604 | U |
The managing director of the blood bank was very unhappy with this report, claiming that his costs were higher than expected due to the emergency on the neighboring islands. He also pointed out that the additional costs had been fully covered by payments from grateful recipients on the other islands. The government official who prepared the report countered that all of the figures had been submitted by the blood bank to the government; he was just pointing out that actual costs were a lot higher than promised in the budget.
The following cost formulas were used to construct the planning budget:
Cost Formulas | |
Medical supplies | $16.50q |
Lab tests | $11.80q |
Equipment depreciation | $3,500 |
Rent | $1,500 |
Utilities | $750 |
Administration | $10,500 + $2.90q |
Required:
1.Complete the flexible budget performance report for September. (Indicate the effect of each variance by selecting "F" for favorable, "U" for unfavorable, and "None" for no effect (i.e., zero variance). Input all amounts as positive values.)
In: Accounting
Prompt the user to input their lucky number. Upon getting the users input, validate that the input is a valid number using Int32.TryParse (more info can be found at https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/how-to-convert-a-string-to-a-number (Links to an external site.)). If the input is not a valid number, output a message to the user stating that you are sorry but you are unable to run the FizzBuzz process due to the input not being a valid number. If the input is valid, you are clear to start the FizzBuzz process. If the input is divisible by 3, then output {number} Fizz. If the input is divisible by 5, then output {number} Buzz. If the input is divisible by 3 AND 5, output {number} FizzBuzz. If it is not divisible by either 3 or 5, simply just output the number.
In: Computer Science
In: Computer Science
Consider the last time you were ill (i.e., flu, headache, cold, etc.). Discuss the extent to which factors other than biological ones may have contributed to your illness.
In: Psychology
Convert the following to Octal, hexadecimal and binary (long method(multiply and Divide by methods))
a.1364.367(10)
b.1568.246(10)
c.846.578(10)
d.245.86(10)
e.2647.95(10)
In: Computer Science