Write a program using any if the C family languages, Java, or Python to show the execution of the specific code in part A.


Welcome to the discussion portal. A place to gain and share knowledge. Here you can ask questions and connect with people who contribute unique insights and quality answers. It is a place for people from around the world to ask and answer questions, and to learn from that process. Every piece of content on the site is generated by users, meaning it is created, edited, and organized by the same people that use the website.
Ask a Question Answer a Question


Write a program that reads a string from the console. If the string is empty or there is no input, it outputs Hello, world!. Otherwise it outputs Hello, followed by the contents of the string.
For example, with interleaved input of John:
Enter a string: John Hello, John!
Note the last line should be terminated by a newline.
Hint: Use hasNextLine() of the Scanner class to check if there is input.
Provide a synthesis of the following molecules. Be sure to show all reagents and isolable products. No mechanisms required. Full credit to those sytheses that maximize yield and minimize side products


Spartan utilities distributes natural gas to households in South-West Michigan. Spartan has 25,000 miles of retail gas distribution pipelines. The distribution pipelines sometimes develop leaks due to weather conditions and corrosion. Spartan estimates that the probability of a gas pipeline developing a leak is 0.0002/year/mile of pipeline. Spartan also estimates that an average leaking pipe incident results in $10,000 in repair costs, $5,000 in natural gas lost, $8,000 in compensation to affected parties, $2,000 in other costs such as evacuation, fire safety, public notification etc. Further, the disruption in service results in loss of sales of $20,000 on which Spartan would have earned profits of $4000.
Â
a. Estimate the expected annual cost to Spartan of such leakage.
b. Suppose an insurance company offer to cover all costs of such leaks except lost sales/profits. The premium is $130,000. Should Spartan utilities buy the insurance?

An article in American Demographics claims that more than twice as many shoppers are out shopping on the weekends than during the week. Not only that, such shoppers also spend more money on their purchases on Saturdays and Sundays! Suppose that the amount of money spent at shopping centers between 4 P.M. and 6 P.M. on Sundays has a normal distribution with mean $82 and with a standard deviation of $20. A shopper is randomly selected on a Sunday between 4 P.M. and 6 P.M. and asked about his spending patterns.
A student performs an experiment and obtains an equilibrium constant of 750. What concentration of FeNCS2+ is found at equilibrium if the reaction began with Fe3+ and SNC- concentrations both equal to 0.150 M?
