vendredi 10 août 2018

Conditional If statements with decimal constaints

Say I have a condition that if a number ends with.00 add 2 to it and if a number ends with.99 add 3 to it. So if I had 5.00 and 5.99, I want to write a nested if statement that would allow me to add the right value to the original number based on its ending.

could someone please help me out on how to do that in R (or python)

Aucun commentaire:

Enregistrer un commentaire