reset password
Author Message
K3ViiiNN
Posts: 8
Posted 16:59 Oct 31, 2013 |

Hello Dr.Sun,

How come when I execute 

select * from grades where id = 0.7;

it doesn't return the data for D-?

cysun
Posts: 2935
Posted 17:03 Oct 31, 2013 |

It's probably because 0.7 can't be represented exactly by a float or real, so the value stored in the table is something like 0.699999999.
 

K3ViiiNN
Posts: 8
Posted 17:08 Oct 31, 2013 |

So for hw4 part 1 if u enter 0.7 do we get points taken off if it doesn't return D-?

cysun
Posts: 2935
Posted 17:12 Oct 31, 2013 |
K3ViiiNN wrote:

So for hw4 part 1 if u enter 0.7 do we get points taken off if it doesn't return D-?

Yes. You are supposed to round it to the closest grades, and 0.7 is obviously closer to D- than other grades.