Please help me with this.
squares =input("\nSquares: ")
print(float((squares) *float(.15)) *(1.3))
Cant print answer.
print(float((squares) * float(.15)) *(1.3))
TypeError: can't multiply sequence by non-int of type 'float'
Thx
L Smit
--
https://mail.python.org/mailman/listinfo/python-lis
Am 27.01.2020 15:23 schrieb Chris Angelico:
The way execution works in Python, you first evaluate the object, then
assign it to the target. The new object HAS to exist before the old
one is replaced. There's no such thing as "atomic reassignment" that
simultaneously destroys the old object and a
On 2020-01-28 12:14 PM, L A Smit wrote:
Please help me with this.
squares =input("\nSquares: ")
print(float((squares) *float(.15)) *(1.3))
Cant print answer.
print(float((squares) * float(.15)) *(1.3))
TypeError: can't multiply sequence by non-int of type 'float'
You have some superfluo
On Tue, Jan 28, 2020 at 9:33 PM Daniel Haude wrote:
>
> Am 27.01.2020 15:23 schrieb Chris Angelico:
>
> > The way execution works in Python, you first evaluate the object, then
> > assign it to the target. The new object HAS to exist before the old
> > one is replaced. There's no such thing as "at
On Wed, Jan 22, 2020, at 02:34, Stephen Tucker wrote:
> Oh dear, I am sorry. I have created quite a storm.
>
> Moreover, I am sorry because I misremembered what I had typed into Idle. My
> original tuple only had two elements, not three, so the slicing [:2] didn't
> affect the tuple at all - and s
On Wed, Jan 29, 2020 at 1:50 AM Random832 wrote:
>
> On Wed, Jan 22, 2020, at 02:34, Stephen Tucker wrote:
> > Oh dear, I am sorry. I have created quite a storm.
> >
> > Moreover, I am sorry because I misremembered what I had typed into Idle. My
> > original tuple only had two elements, not three,
Any recommendations on a library providing a simple interface to Github for
basic push/pull type of actions? I know there's a native GitHub RESTful API but
wondering if anyone has placed a friendly Python wrapper on top of that
interface? PyGithub supports a rich set of actions, but doesn't appe
On Wed, Jan 29, 2020 at 3:38 AM Malcolm Greene wrote:
>
> Any recommendations on a library providing a simple interface to Github
for basic push/pull type of actions? I know there's a native GitHub RESTful
API but wondering if anyone has placed a friendly Python wrapper on top of
that interface? P
Hi
Please find below example and the compiler error,
when i'm assigning value dynamically and when we comparing in "if" loop it
is throwing compiler error. It should not throw error it should assign and
act as int why it is thinking as string.
*Code Snippet:*
print("Hello World")
num = input("E
input() returns a string. If you want it to be treated as an int you need
to cast it, example:
num =int(input ("Enter number"))
On Tue, Jan 28, 2020, 5:13 AM sushma ms wrote:
> Hi
>
> Please find below example and the compiler error,
>
> when i'm assigning value dynamically and when we comparin
On 28/01/2020 12:03, sushma ms wrote:
Hi
Please find below example and the compiler error,
when i'm assigning value dynamically and when we comparing in "if" loop it
is throwing compiler error. It should not throw error
It absolutely should throw an error.
it should assign and
act as int wh
> On 28 Jan 2020, at 16:40, Chris Angelico wrote:
>
> On Wed, Jan 29, 2020 at 3:38 AM Malcolm Greene wrote:
>>
>> Any recommendations on a library providing a simple interface to Github
> for basic push/pull type of actions? I know there's a native GitHub RESTful
> API but wondering if anyon
I'm trying to figure out how the event loop handles switching tasks
inside of an async generator, and consequently, the constraints on its
calling code. For example:
> async def
>
>
>
>
>
>
--
https://mail.python.org/mailman/listinfo/python-list
(Sorry about the double submission)
I'm trying to figure out how the event loop handles switching tasks
inside of an async generator, and consequently, the constraints on its
calling code. For example:
> async def gen():
> for number in range(10 ** 7):
> yield number
>
>
> async def
Hi,
I've made an online python learning environment available at
https://p4kweb.appspot.com
Please take a look and let me know what you think :-)
--
https://mail.python.org/mailman/listinfo/python-list
On 20/12/2019 18:59, Peter Otten wrote:
Chris Angelico wrote:
On Sat, Dec 21, 2019 at 5:03 AM Peter Otten <__pete...@web.de> wrote:
PS: If you are sorting files by size and checksum as part of a
deduplication effort consider using dict-s instead:
Yeah, I'd agree if that's the purpose. But l
Thanks a lot.
But why can't we make output of input also dynamic data assignment.
Thanks & Regards,
Sushma MS
On Tue, Jan 28, 2020, 9:54 PM Mariatta wrote:
> input() returns a string. If you want it to be treated as an int you need
> to cast it, example:
>
> num =int(input ("Enter number"))
>
On 29/01/20 4:51 PM, sushma ms wrote:
Thanks a lot.
But why can't we make output of input also dynamic data assignment.
1 please don't 'top post': the normal sequence of a conversation is
question THEN answer!
2 ambiguity! It is not possible for the input() mechanism to tell
whether you la
Hi,
I'd like to tell what part is zlib.compress data in an input stream.
One way is to use some characters that never appear in zlib.compress
output to denote the boundary. Are there such characters? Thanks.
--
Regards,
Peng
--
https://mail.python.org/mailman/listinfo/python-list
Suppose that I use this to read from stdin. But `line` contains
decoded data in python 3. In python 2, it contains the original data.
What is the best way to get the original data in python 3? Thanks.
```
for line in sys.stdin:
...
```
--
Regards,
Peng
--
https://mail.python.org/mailman/list
On 29/01/20 6:27 pm, Peng Yu wrote:
Suppose that I use this to read from stdin. But `line` contains
decoded data in python 3. In python 2, it contains the original data.
What is the best way to get the original data in python 3?
Read from stdin.buffer, which is a stream of bytes.
--
Greg
--
ht
21 matches
Mail list logo