Computes the wind-chill factor for a given temperature

Assignment Help Programming Languages
Reference no: EM13935893

Exercise 11.2

In the winter, weather reports often refer to the wind-chill factor, a measurement that combines Ami¬d temperature and wind speed to estimate the temperature experienced by an exposed human hem", If the wind speed is 3 miles per hour or less, then the wind is not considered a factor in the experic Thad cmperature-i.e., the wind chill is the same as the actual temperature. If the wind speed exceei% niles per hour, however, meteorologists use a complex formula to compute the wind chill. Assur.-..:is hat temperature stores the actual temperature (in degrees Fahrenheit) and windSpeed store, ire Nind spccd (in miles per hour), we can calculate the wind-chill factor using the following formula

temperature
1if windSpeed s 3
.E-
vindChill = 35.74 + 0.6215*temperature +
(0.4275-temperature - 35.75)*windSpeedr lb otherwise

When translated into JavaScript, the formula for calculating wind chill can be written using the lc& owing if statement:

if (windSpeed <= 3)
windChill = temperature;

else {
windChill = 35.74 + 0.6215*temperature +
(0.4275*temperature - 35.75)*Math.pow(windSpeed, 0.16);
}

Create a Web page named chi 1 1 . html that computes the wind-chill factor for a given temperature and wind speed. The user should be able to enter a temperature and wind speed via text boxes, then click a button to view the corresponding wind-chill factor in a separate text box. As part of your page, you should define a function named Wi ndChi 11 that accepts the temperature and wind speed as in¬puts and returns the wind-chill factor.

Once you have completed your page, use it to determine the wind-chill factors for the following weather conditions:
wind = 2 temp = 30
wind = 5 temp = 18
wind = 12 temp = 45
wind = 30 temp = 10

 

Reference no: EM13935893

Questions Cloud

Kinds of ineffective followership traits does ralph exhibit : What kinds of ineffective followership traits does Ralph exhibit? As an effective follower, how could you respond to Ralph in a way that would encourage him to develop positive followership behaviors?
What islamic modes of finance underpin the idb sukuk : Describe the exact nature of the IDB Sukuk, What Islamic modes of finance underpin the IDB Sukuk? Describe how these modes of finance work and the exact relationship they have with the IDB Sukuk
Comprised of a two-dimensional grid of cells : The farm area that is operated on during the game is comprised of a two-dimensional grid of cells, each representing a plot of land. These cells are referenced by a coordinate pair; e.g. (2, 3). This land can be used to cultivate crops or graze li..
Positive and negative attributes of the leadership style : Research the many leadership styles in management. Select one style and write a report that describes the positive and negative attributes of the leadership style and how you identify with it. (550 words)
Computes the wind-chill factor for a given temperature : The user should be able to enter a temperature and wind speed via text boxes, then click a button to view the corresponding wind-chill factor in a separate text box. As part of your page, you should define a function named Wi ndChi 11 that accepts..
Difference in profit between the two income statements : Reconcile the difference in profit between the two income statements.
What laboratory tests would confirm the diagnosis : What disease is suggested by the combination of fever, rash, and white spots on the patient's buccal mucosa? What pathogen causes this disease? What are the white spots called?
Describe the exact nature of the dubai sukuk : Describe the exact nature of the Dubai Sukuk, What Islamic modes of finance underpin the Dubai Sukuk? Describe how these modes of finance work and the exact relationship they have with the Dubai Sukuk
Explain why investors behaved in the given manner : Explain why investors behaved in this manner. Why does the IFE suggest that South East Asian countries would not have attracted foreign investment before Asian crisis despite high interest rates prevailing in those countries?

Reviews

Write a Review

Programming Languages Questions & Answers

  Create a script file that generates a row vector

Create a script file that generates a row vector of 10 random numbers from 5 to 15 - Call your function using your array of random numbers and the scalar value of 22.

  Program to compute person-s body mass index

Write a program to compute person's body mass index? Create a modular program which calculates and display person's body mass index (BMI).

  Modify the inventory program by adding a button to the gui

modify the inventory program by adding a button to the gui that allows the user to move to the first item the previous

  Program read data from input file and select specified items

Program should be able to read data from input file and select the specified items. Write data for school-age males to file male.out and data for school-age females to female.out.

  Write program to calculate and output tuition

Write a C++ program to calculate and output tuition. Prompt user for number of credits taken and type of classes ('U' for undergraduate - $380 per credit hour, or 'G' for graduate.

  Write program to accept data in array with three structures

Develop and make a program which will accept above data in array with three structures. Once data have been entered, display report listing each employee number and salary of employee.

  Write a program that explores the seating patterns

Write a program that explores the seating patterns related to course performance by using an array of student scores. The program should do the following: Draw a seating chart of the classroom

  Use the formula to determine the total amount of payment

If the loan was $20,000 over 15 years at 12 percent the repayment would be $240.08

  Create a function that carries out the desired action

Create your own assignment to get more practice with arrays. Listed below are twenty seven functions you can write that deal with arrays. Listed next to each function is a number of points each is worth in parenthesis. Create a function that carri..

  Write the required lines of code

Write the required lines of code that will create a ServerSocket object with a port number 3421 on which the server program is going to listen for client communications. Write the required lines of code that will create a new socket object

  Make a note of how many records that were deleted

Save your SQL query as SQLQuery1D3 and execute the statement.

  Technical project: sample website project

Technical Project: Sample Website Project , This assignment consists of three (3) sections: a narrative, a storyboard, and a business Website. You must submit all three (3) sections for the completion of this assignment.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd