Wednesday, November 14, 2018

problem -1

Plantation
A certain crop grown in a sunny and hot climate needs more water per day than the same crop grown in a cloudy and cooler climate. There are, however, apart from sunshine and temperature, other climatic factors which influence the crop water need. These factors are humidity and wind speed. When it is dry, the crop water needs are higher than when it is humid. In windy climates, the crops will use more water than in calm climates.
The highest crop water needs are thus found in areas which are hot, dry, windy and sunny. The lowest values are found when it is cool, humid and cloudy with little or no wind. 

Given 3 crops along with the range of the amount of water required and the temperature range.
Crop 1: Rice – 5 to 10 cm , 20 to 27 degree celcius, all  inclusive.
Crop 2: Wheat – 12 to 15 cm, 21 to 24 degree celcius, all inclusive.
Crop 3: Cotton – 6 to 13 am, 18 to 30 degree celcius, all inclusive.
  Note: Follow the above crops order.

Determine what all crops can be planted, given the rainfall and temperature. 

Input format: 
The first input is an integer which corresponds to the water required. 
The second input is an integer which corresponds to the temperature. 

Output format: 
Output is a string or a list of strings. 
If there are multiple strings in the output, the order to be followed is Rice, Wheat, Cotton. 

Sample Input 1: 
6 
20 
Sample Output 1: 
Rice 
Cotton 

Sample Input 2: 
15 
21 
Sample Output 2: 
Wheat





No comments:

 DBMS class materials click here to join the class room  click here  https://www.youtube.com/channel/UC93Sqlk_tv9A9cFv-QjZFAQ