1answer.
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
alina1380 [7]
3 years ago
12

Rainfall_mi is a string that contains the average number of inches of rainfall in Michigan for every month (in inches) with ever

y month separated by a comma. Write code to compute the number of months that have more than 3 inches of rainfall. Store the result in the variable num_rainy_months. In other words, count the number of items with values > 3.0.
Computers and Technology
1 answer:
const2013 [10]3 years ago
5 0

Answer:

Hi!

The answer in Javascript is:

function monthsWithMoreOfThree() {

  var Rainfall_mi = '3,4,1,5,2,6,7,9'; <em>//Defined and declared</em>

  var num_rainy_months = 0;

  var values = Rainfall_mi.split(","); <em>//use split method for Strings. Array is returned</em>

   for (var i = 0; i < values.length; i++) { <em>//for each value, compares with 3</em>

     if(values[i] > 3) { <em>//In Javascript, you can compare an String value with an int. Can use parseInt(aString) to explicit parse but is not necessary</em>

       num_rainy_months++; <em>//If value is greater than 3, adds 1 to num_rainy_months</em>

     }

   }

}

You might be interested in
Use ordinary pipes to implement an inter-process communication scheme for message passing between processes. Assume that there a
Naya [18.7K]

Answer:

Yup

Explanation:

6 0
3 years ago
In 3–5 sentences, describe how good e-mail work habits increase workplace efficiency and productivity.
Ket [755]
Faster communication, information spread faster, group messages
6 0
3 years ago
An excel worksheet can have a maximum of ____ columns in a worksheet.
Marina CMI [18]

It can have only 16,384 number of columns

6 0
3 years ago
Safety glasses should be worn in which of the following situations?
N76 [4]
When any substance is being heated. Safety glasses
8 0
3 years ago
Limiting the amount of personal information available to others includes reducing your ______________ footprint
Gala2k [10]

The blank should be filled with "digital"

6 0
3 years ago
Other questions:
  • How would you describe enterprise computing
    12·1 answer
  • While a threat intelligence analyst was researching an indicator of compromise on a search engine, the web proxy generated an al
    7·1 answer
  • apple and adobe are in disagreement about the use of __________ to create apps for the iphone and ipad?
    10·1 answer
  • What does the clone tile command do?
    15·2 answers
  • How we know that how many domain exist in window server 2012?
    14·1 answer
  • How many characters does the "short text" have?
    9·1 answer
  • If your microwave oven is a computer, define its Operating System and User Interface.
    12·1 answer
  • If you play gta and don't know the song ''Glamorous'' Then what do you even do when you play?
    6·2 answers
  • How do you answer a question that's already been answered?
    5·1 answer
  • 4. Ernesto works in a small office with five other people. What are two possible connection
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!