How to get real quotient in python 2 -


since division operator "/" returns floor quotient. when numerator or denominator minus number, operator "/" not return real quotient. -1/3 returns -1 rather 0. how can real quotient?

try this,

a = 1 b = 3 print -(a / b) 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -