We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If you're working with division in Python, make sure to use / for float division and // for integer division. For example, 5 / 2 returns 2.5 while 5 // 2 returns 2.
If you're exploring more coding tips, check out this helpful resource on Menu — it covers a variety of tech and programming topics!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Python: Division
You are viewing a single comment's thread. Return to all comments →
If you're working with division in Python, make sure to use / for float division and // for integer division. For example, 5 / 2 returns 2.5 while 5 // 2 returns 2.
If you're exploring more coding tips, check out this helpful resource on Menu — it covers a variety of tech and programming topics!