Advertisement
wagner-cipriano

division in python

Oct 14th, 2016
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. # -*- coding:UTF-8 -*-
  2. #Divisão em python. #Compatibilidade: py2 e py3
  3. from __future__ import print_function      #Compatibilidade func print python 2/3
  4. from sys import version_info
  5.  
  6. print('Voce esta na versao:', '.'.join(str(x) for x in version_info[0:3]))
  7. print ('  3/2 == 1.5  ',  3 / 2 == 1.5)
  8. print ('  3/2 == 1    ',  3 / 2 == 1)
  9. print ('  3//2 == 1.5 ',  3 / 2 == 1.5)
  10. print ('  3//2 == 1   ',  3 / 2 == 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement