Given a string str of even length, print out the first half.
Methods to use: substring(), length()
Testing cases:
WooHoo => Woo
HelloThere => Hello
abcdef => abc
ab => a
0123456789 => 01234
kitten => kit
(Note that the sample input test cases are shown before the “=>” and the expected output each test case is after the “=>”.
Your program should print out the expected output only, not the input.)
In: Computer Science
In: Operations Management
Suppose GDP is $12 trillion, taxes are $3.6 trillion, private saving is $1.5 trillion, and public saving is $0.8 trillion.
Assuming the economy is closed, complete the following table by calculating consumption, government purchases, national saving, and investment.
| Component | amount(trillions of dollars) |
| consumption | |
| government purchases | |
| national savings | |
| investment |
In: Economics
An R-C circuit with R = 100 ohm and C = 3 mF is connected to a 90 V source of emf. At t = 0 the switch is closed and the capacitor begins to charge.
a) How much energy (in J) is stored in the capacitor at t = 0.7 s?
b) What is the largest amount of energy that can be store in the capacitor?
In: Physics
Consider the following scenario. You grab a box of cereal from your pantry, and you carry it over to your table. When you get there, you change your mind and return the box of cereal to its original spot. Is this a reversible process if the closed system is your house/apartment? Explain your answer
In: Physics
A mole of air is sampled from the atmosphere when the atmospheric pressure is 765 mm Hg, the
temperature is 25 C, and relative humidity is 75%. The sample of air is placed inside a closed container
and heated to 135 C and then compressed to 2 atm. What are the relative humidity, the humidity, and the mole fraction of water in the compressed air?
In: Chemistry
1)What is energy? Is it conserved, and how is this conservation different than momentum?
2) What is the difference between a closed system and an isolated system?
3) What is the difference between elastic, inelastic, totally inelastic, and super-elastic collision?
4) What is Mazur's notation for relative velocity and what is relative velocity anyway?
In: Physics
3 Define “chromatin remodeling’, “open chromatin” and “closed chromatin"
4.What is the SWI/SNF complex and what does it do?
Ill Rate High
In: Biology
true or false
In: Economics
Which of the following is not an example of a chemical hazard?
toxic by-products, such as vapors and fumes, caused by mixing incompatible materials
skin irritation, disfiguring burns, eye injury or blindness caused by corrosive products
pressure build up in a closed system has the potential for explosion/implosion
|
injury from exploding containers, such as spray cans |
In: Chemistry