Not to repeat two identical loops inside `if` and `else` parts of the conditional statement you should place the `if` statement inside single loop block.

Also you have 5 identical lines in each loop:
```
 +      puts valic_temp
 +      sleep 0.1
 +      i+=1
 +      clear
 +      valic_temp.clear
```
Try to clean up that.