0

Am using python 2.3.5 (command line) when I input 9**(1/2)=1 I know literally is 3.0 but my pc gave me 1. Any help

28th Dec 2016, 5:43 PM
OBENG ERIC
OBENG ERIC - avatar
2 Answers
+ 2
Python2's division sign is used for integer division (Python3's //) unless at least one of the arguments is a float. So 1/2 gives 0, not 0.5
30th Dec 2016, 6:05 AM
Amaras A
Amaras A - avatar
0
put all of code
28th Dec 2016, 7:23 PM
Minovsky
Minovsky - avatar