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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -