Questions
Write a program that will guess an integer that the user has picked. Imagine that the...

Write a program that will guess an integer that the user has picked. Imagine that the user will write down a positive integer x on a piece of paper and your program will repeatedly ask questions in order to guess what x is, and the user replies honestly. Your program will start by asking for an int n, and you must have 1 ≤ x ≤ n. After that, the program will successively guess what x is, and the user must tell the computer if x is equal to the guess (entering ’e’), larger than the guess (entering ’l’), or smaller than the guess (entering ’s’). Your program will guess by maintaining a lower bound (initially 1) and upper bound (initially n) and pick the largest integer equal to or smaller than1 the midpoint of the lower bound and upper bound. If the user responds with ’l’ indicating that x is larger, the guess becomes the new lower bound plus one. If the user responds with ’s’ indicating that x is smaller, the guess becomes the new upper bound minus one. If the user responds with ’e’ indicating that x is the guess, your program will report the number of guesses made and terminate execution:

Example 1)

Enter n: 50

Is your number 25? l

Is your number 38?

l Is your number 44? s

Is your number 41? e

Your number must be 41. I used 4 guesses.

Example 2)

Enter n: 9

Is your number 5? s

Is your number 2?

l Is your number 3? s

Error: that’s not possible.

Example 3)

Enter n: -2

Error: n must be positive.

Example 4)

Enter n: 9

Is your number 5? m

Error: invalid input.

Example 5)

Enter n: a

Error: invalid input.

In: Computer Science

please share your opinons As an HR director of 5 starts hotel, what can you do...

please share your opinons

As an HR director of 5 starts hotel, what can you do to create employee engagement during this COVID-19 for:

Your work from home (WFH) employee, your unpaid employees and your active working employees.

In: Operations Management

The energy from condensing water vapor is used to melt ice at 0oC. What mass (kg)...

The energy from condensing water vapor is used to melt ice at 0oC. What mass (kg) of ice can be melted by condensing 0.500 kg of water vapor? (ΔHfus = 6.01 kJ/mol and ΔHvap = 40.7 kJ/mol)

In: Chemistry

Wildhorse Co. markets CDs of numerous performing artists. At the beginning of March, Wildhorse had in...

Wildhorse Co. markets CDs of numerous performing artists. At the beginning of March, Wildhorse had in beginning inventory 2,500 CDs with a unit cost of $8. During March, Wildhorse made the following purchases of CDs.

March 5

2,000 @ $9

March 21

4,900 @ $11

March 13

3,800 @ $10

March 26

2,000 @ $12


During March 11,600 units were sold. Wildhorse uses a periodic inventory system.

Determine the cost of goods available for sale.

The cost of goods available for sale

$enter the cost of goods available for sale in dollars



Calculate Average Cost. (Round answer to 3 decimal places, e.g. 5.125.)

Average Cost

$enter an average cost in dollars

eTextbook and Media

List of Accounts

Determine (1) the ending inventory and (2) the cost of goods sold under each of the assumed cost flow methods (FIFO, LIFO, and average-cost). (Round answers to 0 decimal places, e.g. 125.)

FIFO

LIFO

AVERAGE-COST

The ending inventory

$enter a dollar amount $enter a dollar amount $enter a dollar amount

The cost of goods sold

$enter a dollar amount $enter a dollar amount $enter a dollar amount

eTextbook and Media

List of Accounts

Which cost flow method results in (1) the highest inventory amount for the balance sheet and (2) the highest cost of goods sold for the income statement?

(1) select a method which                                                                      Average-costFIFOLIFO produces the highest inventory amount.
(2) select a method which                                                                      Average-costFIFOLIFO produces the highest cost of goods sold.

In: Accounting

) The standard enthalpies of formation of SO2 and SO3 are ?297 and ?396 kJ/mol respectively....

) The standard enthalpies of formation of SO2 and SO3 are ?297 and ?396 kJ/mol respectively. Calculate the standard enthalpy of reaction for the reaction:   SO2(g)  + 1/2O2(g)??SO3 (g)

In: Chemistry

TIPS or Treasury Inflation Protection Securities incur what kind of risk(s): default risk, interest rate risk,...

TIPS or Treasury Inflation Protection Securities incur what kind of risk(s): default risk, interest rate risk, call risk, purchasing power risk, reinvestment risk, or liquidity risk.

In: Finance

Rebeca Pérez is the Controller of the firm Pérez Martínez & Asociados. She has been evaluating...

Rebeca Pérez is the Controller of the firm Pérez Martínez & Asociados. She has been evaluating inventory reports over the past few months and thinks that one or more employees have been stealing large amounts of inventory that was for sale. Quickly, Rebeca asked the staff that manages the information systems to look for data that would help her solve this situation, however, they indicated that, mysteriously, much of the inventory information had been lost and they had no explanation for it. Rebeca talked to the company's internal auditors to ask about the missing reports and they were not aware of the situation either.

Based on the above, answer the following questions in paragraph form (5 to 6 sentences each):

1. What should Rebecca do? Should she call the police or should she hire an outside forensic accountant?

2. How can a forensic accountant help you solve this case? Look for outside information to elaborate on your answer.

3. What things can the forensic accountant do that an internal auditor cannot do?

In: Accounting

Hello, can you assist with the below? What is the main benefit of network effects to...

Hello,

can you assist with the below?

  1. What is the main benefit of network effects to users? What is the main benefit to a network owner? Describe how the social network LinkedIn provides 3 advantages to users based on network effects.

In: Operations Management

Answer each of the following questions in separate paragraphs. Be brief and to the point. 1....

Answer each of the following questions in separate paragraphs. Be brief and to the point.

1. What are Milankovic cycles? (1 point)

2. List three astrophysical reasons that give rise to periodic climatic variations on Earth. (1.5 points)

3. What evidence do we have for past Milankovic cycle based climate change on Earth?

In: Physics

Choose 3 journal articles you think will be useful as references for your formal lab report...

Choose 3 journal articles you think will be useful as references for your formal lab report paper. You may use review articles or research articles. You might try typing in a keyword for your topic and the word “review”.   Obtain copies either from the library or from an on-line resource. In the space provided below, explain in no more than 5 sentences per article why you feel the article you have selected is appropriate for your paper. Just because your key word appears in the title does not automatically mean the paper will be useful for your report. Briefly state how you will use it in your report. Attach a copy of each article to the assignment before handing it in. Directions on how to access electronic journals through the University of Houston Library are at the end of this document. If you cannot download an article you desire directly from the PubMed website, try through the University of Houston Library electronic journals collection. If the university does not have the electronic version on file, you will have to go to the library and copy it on a copy machine (the old-fashioned way). If you cannot obtain a copy of the article, you can place a request through interlibrary loan at the service desk at the library or you will need to find another article.

in Crystallography

you can chose any subject you want :)

In: Chemistry

A ball is thrown straight up with a speed of 30 m/s. (a.) How long does...

A ball is thrown straight up with a speed of 30 m/s. (a.) How long does it take the ball to reach the maximum height? (b.) What is the maximum height reached by the ball?(c.) What is its speed after 4.2 s?

*PLEASE Provide Worked Out Solutions (w/ decimal place rounding)*

Thanks everyone!

In: Physics

In the Python: Note 1: You may not use these python built-in functions: sorted(), min(), max(),...

In the Python:

Note 1: You may not use these python built-in functions:

sorted(), min(), max(), sum(), pow(), zip(), map(), append(), count() and counter().

(7 points) unique.py: A number in a list is unique if it appears only once. Given a list of

random numbers, print the unique numbers and their count. Print the duplicate numbers and

their count.

Sample runs:

Enter the size of the list : 7

[8, 2, 6, 5, 2, 4, 5]

There are 3 unique numbers: 8 6 4

There are 2 duplicate numbers: 2 5

Sample run:

Enter the size of the list : 7

[2, 2, 4, 3, 3, 3, 4]

There are 0 unique numbers:

There are 3 duplicate numbers: 2 3 4

In: Computer Science

Two 50 ?? long, thin parallel straight wires (grey) are connected at their ends by metal...

Two 50 ?? long, thin parallel straight wires (grey) are connected at their ends by metal springs. The mass of each thin wire is 1.0 ?. The upper wire is connected to the ceiling by (non-conducting) stiff rods. Each spring has an equilibrium length of 5.0 ?? and a spring constant of ? = 0.50 ?/?. A steady current ? runs clockwise through the wire-spring loop as indicated by the arrow. At equilibrium, the lower rod hangs at a level 6.0 ?? below the upper wire. Find the magnitude of the current. You may ignore the magnetic fields generated by the springs, and you may approximate the magnetic fields generated by the wires as those from long, straight wires

In: Physics

Two blocks, of weights 3.5 N and 5.8 N, are connected by a massless string and...

Two blocks, of weights 3.5 N and 5.8 N, are connected by a massless string and slide down a 39° inclined plane. The coefficient of kinetic friction between the lighter block and the plane is 0.064; that between the heavier block and the plane is 0.30. Assuming that the lighter block leads, find (a) the magnitude of the acceleration of the blocks and (b) the tension in the string.

In: Physics

In the figure below, the hanging object has a mass of m1 = 0.410 kg; the...

In the figure below, the hanging object has a mass of m1 = 0.410 kg; the sliding block has a mass of m2 = 0.765 kg; and the pulley is a hollow cylinder with a mass of M = 0.350 kg, an inner radius of R1 = 0.020 0 m, and an outer radius of R2 = 0.030 0 m. Assume the mass of the spokes is negligible. The coefficient of kinetic friction between the block and the horizontal surface is ?k = 0.250. The pulley turns without friction on its axle. The light cord does not stretch and does not slip on the pulley. The block has a velocity of vi = 0.820 m/s toward the pulley when it passes a reference point on the table.

(a) Use energy methods to predict its speed after it has moved to a second point, 0.700 m away.
m/s

(b) Find the angular speed of the pulley at the same moment.
rad/s

In: Physics