2009/12/4 Ed <sp...@yandex.ru>:
> x_empty_dragon wrote:
>>
>> python?
>
>
>>>> 2+2^(1/2)
> 4
>>>> 2+2.0^(1.0/2)
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> TypeError: unsupported operand type(s) for ^: 'float' and 'float'
>>>> 0x16+0b10
>  File "<stdin>", line 1
>   0x16+0b10
>           ^
> SyntaxError: invalid syntax

^ is the bitwise XOR operator. For exponentiation, use **.

2+2.0**(1.0/2)
3.4142135623730949

>
>
> --
> To UNSUBSCRIBE, email to debian-russian-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
>
>


--
To UNSUBSCRIBE, email to debian-russian-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Ответить