answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kakasveta [241]
2 years ago
7

write a java script function that allows the user to enter and convert Kenyan shillings into US dollars when a button is clicked

on a web page. rate is 1 $ dollar 115 Ksh​
Engineering
1 answer:
DochEvi [55]2 years ago
3 0

Answer:

Explanation:

Like requested the following function is written in JavaScript and prompts the user for a total amount of Kenyan Currency that needs to be converted. It then places that value in a variable and divides it by 115 Ksh so that it gives us the USD value of that currency. Then that value is returned. The function can be attached to any button but it must be done manually when creating the button's onClick method.

function convertCurrency() {

 

 var KenyanAmount = prompt("Please enter the amount of Kenyan you want to convert.");

 var usdValue = "$" + (KenyanAmount / 115);

 return usdValue;

}

You might be interested in
A fatigue test was conducted in which the mean stress was 46.2 MPa and the stress amplitude was 219 MPa.
sleet_krkn [62]

Answer:

a)σ₁ = 265.2 MPa

b)σ₂ = -172.8 MPa

c)Stress\ ratio =-0.65

d)Range = 438 MPa

Explanation:

Given that

Mean stress ,σm= 46.2 MPa

Stress amplitude ,σa= 219 MPa

Lets take

Maximum stress level = σ₁

Minimum stress level =σ₂

The mean stress given as

\sigma_m=\dfrac{\sigma_1+\sigma_2}{2}

2\sigma_m={\sigma_1+\sigma_2}

2 x 46.2 =  σ₁ +  σ₂

 σ₁ +  σ₂ = 92.4 MPa    --------1

The amplitude stress given as

\sigma_a=\dfrac{\sigma_1-\sigma_2}{2}

2\sigma_a={\sigma_1-\sigma_2}

2 x 219 =  σ₁ -  σ₂

 σ₁ -  σ₂ = 438 MPa    --------2

By adding the above equation

2  σ₁ = 530.4

σ₁ = 265.2 MPa

-σ₂ = 438 -265.2 MPa

σ₂ = -172.8 MPa

Stress ratio

Stress\ ratio =\dfrac{\sigma_{min}}{\sigma_{max}}

Stress\ ratio =\dfrac{-172.8}{265.2}

Stress\ ratio =-0.65

Range = 265.2 MPa - ( -172.8 MPa)

Range = 438 MPa

8 0
2 years ago
. A cylindrical metal specimen having an original diameter of 12.8 mm (0.505 in.) and gauge length of 50.80 mm (2.000 in.) is pu
kogti [31]

Answer:

% reduction in area==PR=0.734=73.4%

% elongation=EL=0.42=42%

Explanation:

given do=12.8 mm

df=6.60

Lf=72.4 mm

Lo=50.8 mm

% reduction in area=((\pi*(do/2)^2)-(\pi*(df/2)^2)))/\pi*(do/2)^2

substitute values

% reduction in area=73.4%

% elongation=EL=((Lf-Lo)/Lo))*100

% elongation=((72.4-50. 8)/50.8)*100=42%

6 0
2 years ago
A 50-kg iron block and 20-kg copper block, both initially at 80 oC, are dropped into a large lake at 15 oC. Thermal equilibrium
bija089 [108]
I need this answer to please
5 0
2 years ago
A 227 pound compressor is supported by four legs that contact the floor of a machine shop. At the bottom of each leg there is a
Ganezh [65]

Answer:

1.312 in

Explanation:

Data provided in the question:

Weight of the compressor, W = 227 pound

Number of legs = 4

Maximum pressure = 42 psi

Now,

Let F be the force taken by the legs

Therefore,

W = 4F

or

227 pound = 4F

or

F = 56.75 pounds

Also,

Force = Pressure × Area

or

56.75 pounds = 42 psi × πr²                      [ r is the diameter of one leg]

or

r² = 0.4301

or

r = 0.656

therefore,

diameter = 2r = 2 × 0.656

= 1.312 in

6 0
2 years ago
Twenty distinct cars park in the same parking lot every day. Ten of these cars are US-made, while the other ten are foreign-made
Zina [86]

Answer:

Total no. of ways to line up cars is 20! = 2.43 c 10^18

Probability that the cars alternate is 0.00001 or 0.001%

Explanation:

Since, the position of a car is random.Therefore, number ways in which cars can line up is given as:

<u>No. of ways = 20! = 2.43 x 10^18</u>

For the probability that cars alternate, two groups will be formed, one consisting of US-made 10 cars and other containing 10 foreign made. The number of favorable outcomes for this can be found out as the arrangements of 2! between these groups multiplied by the arrangements of 10! for each group, due to the arrangements among the groups themselves.

Favorable Outcomes = 2! x 10! x 10!

Thus the probability of event will be:

Probability = Favorable Outcomes/Total No. of Ways

Probability = (2! x 10! x 10!)/20!

<u>Probability = 0.00001 = 0.001%</u>

4 0
2 years ago
Other questions:
  • A railcar with an overall mass of 78,000 kg traveling with a speed vi is approaching a barrier equipped with a bumper consisting
    15·1 answer
  • When a man returns to his well-sealed house on a summer day, he finds that the house is at 35°C. He turns on the air conditioner
    13·1 answer
  • An uninsulated, thin-walled pipe of 100-mm diameter is used to transport water to equipment that operates outdoors and uses the
    9·1 answer
  • A flexural member is fabricated from two flange plates 7-1/2 x ½ and a web plate 17 x 3/8. The yield stress of steel is 50 ksi.
    8·1 answer
  • Vehicles arrive at a single toll booth beginning at 8:00 A.M. They arrive and depart according to a uniform deterministic distri
    9·1 answer
  • Two kilograms of oxygen fills the cylinder of a piston-cylinder assembly. The initial volume and pressure are 2 m3 and 1 bar, re
    6·2 answers
  • A thin-walled tube with a diameter of 6 mm and length of 20 m is used to carry exhaust gas from a smoke stack to the laboratory
    7·1 answer
  • Question 14<br> Which of these is true of a spray wash cabinet?
    6·1 answer
  • Dalton needs to prepare a close-out report for his project. Which part of the close-out report would describe
    6·1 answer
  • Is an isothermal process necessarily internally reversible? Explain your answer with an example
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!