Introduction To Python - Learn Python the hard way v2.0
Please submit links to your blog posts related to this activity
This section contains reviews provided by the community for the activity response specified at the top of the page. Please use the form at the end to provide a constructive review of the activity.
Please login to provide a review of this activity response
@trukise, nice activity response.
In this case using 4 instead of 4.0 will not change the result. However, remember when you do a pure decimal operation, the result will also be in decimal.
2/4 => will give you 0 (because the floating point part is truncated)
2.0/4.0 => will give you 0.5