Question: #### 5 . Values in the vector 'rainfall' are in inches. You can calculate the rainfall in centimeters by dividing each value by 0 .
#### Values in the vector 'rainfall' are in inches. You can calculate the rainfall in centimeters by dividing each value by Write a 'for' loop to iterate over each value in the rainfall vector and print the rainfall in centimeters
r
fori in :lengthrainfall
rainfallcm rainfalli
printrainfallcm
#### Use a 'for' loop and an ifelse' condition to print the values only if the rainfall is greater than centimerters.
r
for i in : lengthrainfall
rainfallcm rainfalli
if rainfallcm
printrainfallcm
#### Create a function to covert rainfall in inches to centimeters. Round the answer to decimal places. Pass the value to the function and print the output with cm at the end.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
