Re: [Beginner] Spliting input

2020-06-25 Thread Andrew Jaffe
Hi, On 25/06/2020 12:50, Bischoop wrote: I try to split input numbers, for example: 12 so I cant add them, I tried separated split(' ') but it's not working. Any ideas how to do this? * numb1,numb2=input("enter 1st and 2nd no ").split() Avg=(int(numb1) + int(numb2)) / 2 print(Avg) So, this i

Re: [Beginner] Spliting input

2020-06-25 Thread Peter Otten
Bischoop wrote: > I try to split input numbers, for example: 12 so I cant add them, I > tried separated split(' ') but it's not working. > Any ideas how to do this? > > * > numb1,numb2=input("enter 1st and 2nd no ").split() > Avg=(int(numb1) + int(numb2)) / 2 > print(Avg) > * > > -- > Thanks To

Re: [Beginner] Spliting input

2020-06-25 Thread Frank Millman
On 2020-06-25 2:13 PM, Bischoop wrote: On 2020-06-25, Andrew Bell wrote: Without knowing the problem you're having, it's hard to answer. This seems generally correct. Error track: Traceback (most recent call last): File "splitting.py", line 1, in numb1,numb2=input("enter 1st and 2

Re: [Beginner] Spliting input

2020-06-25 Thread Bischoop
On 2020-06-25, Andrew Bell wrote: > Without knowing the problem you're having, it's hard to answer. > This seems generally correct. > > Error track: Traceback (most recent call last): File "splitting.py", line 1, in numb1,numb2=input("enter 1st and 2nd no ").split() ValueError: not

Re: [Beginner] Spliting input

2020-06-25 Thread Andrew Bell
Without knowing the problem you're having, it's hard to answer. This seems generally correct. On Thu, Jun 25, 2020 at 7:57 AM Bischoop wrote: > I try to split input numbers, for example: 12 so I cant add them, I > tried separated split(' ') but it's not working. > Any ideas how to do this? > > *

[Beginner] Spliting input

2020-06-25 Thread Bischoop
I try to split input numbers, for example: 12 so I cant add them, I tried separated split(' ') but it's not working. Any ideas how to do this? * numb1,numb2=input("enter 1st and 2nd no ").split() Avg=(int(numb1) + int(numb2)) / 2 print(Avg) * -- Thanks -- https://mail.python.org/mailman/listinf