Knowee
Questions
Features
Study Tools

In Chefland, precipitation is measured using a rain gauge in millimetre per hour.Chef categorises rainfall as:LIGHT, if rainfall is less than 33 millimetre per hour.MODERATE, if rainfall is greater than equal to 33 millimetre per hour and less than 77 millimetre per hour.HEAVY if rainfall is greater than equal to 77 millimetre per hour.Given that it rains at 𝑋X millimetre per hour on a day, find whether the rain is LIGHT, MODERATE, or HEAVY.Input FormatThe first line of input will contain a single integer 𝑇T, denoting the number of test cases.Each test case consists of a single integer 𝑋X — the rate of rainfall in millimetre per hour.Output FormatFor each test case, output on a new line, whether the rain is LIGHT, MODERATE, or HEAVY.You may print each character in lowercase or uppercase. For example, LIGHT, light, Light, and liGHT, are all identical.Constraints1≤𝑇≤201≤T≤201≤𝑋≤201≤X≤20Sample 1:InputOutput412037LIGHTHEAVYMODERATEHEAVYExplanation:Test case 11: The rate of precipitation is less than 33. Thus, the rain is LIGHT.Test case 22: The rate of precipitation is greater than equal to 77. Thus, the rain is HEAVY.Test case 33: The rate of precipitation is greater than equal to 33 and less than 77. Thus, the rain is MODERATE.Test case 44: The rate of precipitation is greater than equal to 77. Thus, the rain is HEAVY.

Question

In Chefland, precipitation is measured using a rain gauge in millimetre per hour.Chef categorises rainfall as:LIGHT, if rainfall is less than 33 millimetre per hour.MODERATE, if rainfall is greater than equal to 33 millimetre per hour and less than 77 millimetre per hour.HEAVY if rainfall is greater than equal to 77 millimetre per hour.Given that it rains at 𝑋X millimetre per hour on a day, find whether the rain is LIGHT, MODERATE, or HEAVY.Input FormatThe first line of input will contain a single integer 𝑇T, denoting the number of test cases.Each test case consists of a single integer 𝑋X — the rate of rainfall in millimetre per hour.Output FormatFor each test case, output on a new line, whether the rain is LIGHT, MODERATE, or HEAVY.You may print each character in lowercase or uppercase. For example, LIGHT, light, Light, and liGHT, are all identical.Constraints1≤𝑇≤201≤T≤201≤𝑋≤201≤X≤20Sample 1:InputOutput412037LIGHTHEAVYMODERATEHEAVYExplanation:Test case 11: The rate of precipitation is less than 33. Thus, the rain is LIGHT.Test case 22: The rate of precipitation is greater than equal to 77. Thus, the rain is HEAVY.Test case 33: The rate of precipitation is greater than equal to 33 and less than 77. Thus, the rain is MODERATE.Test case 44: The rate of precipitation is greater than equal to 77. Thus, the rain is HEAVY.

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

Here's how to solve this problem:

Step 1: Understand the problem. The problem is asking to categorize the rainfall into LIGHT, MODERATE, or HEAVY based on the given conditions.

Step 2: Read the number of test cases. The first line of the input will contain a single integer T, denoting the number of test cases.

Step 3: For each test case, read the rate of rainfall. Each test case consists of a single integer X — the rate of rainfall in millimetre per hour.

Step 4: Determine the category of the rainfall. If the rate of rainfall is less than 33, it is LIGHT. If it is greater than or equal to 33 and less than 77

This problem has been solved

Similar Questions

Write the rate in lowest terms.During a bad storm there was 4in of rain in 12hr.

Chef was driving on a highway at a speed of 𝑋X km/hour.To avoid accidents, there are fine imposed on overspeeding as follows:No fine if the speed of the car ≤70≤70 km/hour.Rs 500500 fine if the speed of the car is strictly greater than 7070 and ≤100≤100.Rs 20002000 fine if the speed of the car is strictly greater than 100100.Determine the fine Chef needs to pay.Input FormatThe first line of input will contain a single integer 𝑇T, denoting the number of test cases.Each test case consists of a single integer 𝑋X denoting the speed of Chef's car.Output FormatFor each test case, output the fine paid by Chef.Constraints1≤𝑇≤2001≤T≤2001≤𝑋≤2001≤X≤200Sample 1:InputOutput74011070100691018502000050002000500Explanation:Test case 11: The speed is ≤70≤70. Thus, Chef does not need to pay any fine.Test case 22: The speed is greater than 100100. Thus, Chef needs to pay 20002000 as fine.Test case 33: The speed is ≤70≤70. Thus, Chef does not need to pay any fine.Test case 44: The speed is greater than 7070 and ≤100≤100. Thus, Chef needs to pay 500500 as fine amount.Test case 55: The speed is ≤70≤70. Thus, Chef does not need to pay any fine.Test case 66: The speed is greater than 100100. Thus, Chef needs to pay 20002000 as fine.Test case 77: The speed is greater than 7070 and ≤100≤100. Thus, Chef needs to pay 500500 as fine amount.

A weather forecast agency predicts that the average rainfall this year will be more than 800 mm. Determine the null and alternate hypotheses along with the type of test.H0:Averagerainfall=800mm,H1:Averagerainfall≠800mmTesttype:Two−tailedtestH0:Averagerainfall≤800mm,H1:Averagerainfall≥800mmTesttype:Lower−tailedtestH0:Averagerainfall≥800mm,H1:Averagerainfall<800mmTesttype:Two−tailedtestH0:Averagerainfall≤800mm,H1:Averagerainfall>800mmTesttype:Upper−tailedtest

The table shows the recordings of rainfall, in centimetres, on seven successive days.Mon Tues Wed Thurs Fri Sat Sun1.25 1.05 0.15 0.45 0.85 0.65 0.4What was the total rainfall for the whole week?

What unit of measurement is required to answer the question in the problem?"You and your friends are planning to have a picnic at the park. However, on the day of the picnic, a big storm is approaching with strong winds and heavy rain. The park is 12 kilometers away from your house, and you need to figure out how fast you need to go roller skating to get there before the storm hits. The storm is expected to arrive in 2 hours."Question 6AnswerA.meter/s (m)B.hour/s ( h )C.kilometer/s (k)D.kilometers per hour (kph)

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.