Peter Otten wrote:
> if isint and y < -1 or y > 1:
Sorry, I forgot the parentheses.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Michael Lewis wrote:
> I am trying to do a simple test but am not sure how to get around ASCII
> conversion of characters. I want to pass in y have the function test to
> see if y is an integer and print out a value if that integer satisfies the
> if statement. However, if I pass in a string, it's
On 31/01/2012 05:33, Christian Witts wrote:
On 2012/01/31 06:50 AM, Michael Lewis wrote:
I am trying to do a simple test but am not sure how to get around
ASCII conversion of characters. I want to pass in y have the function
test to see if y is an integer and print out a value if that integer
sa
On 2012/01/31 06:50 AM, Michael Lewis wrote:
I am trying to do a simple test but am not sure how to get around
ASCII conversion of characters. I want to pass in y have the function
test to see if y is an integer and print out a value if that integer
satisfies the if statement. However, if I pas
On Tue, Jan 31, 2012 at 15:50, Michael Lewis wrote:
> ... However, if I pass in a string, it's converted to ASCII and will
> still satisfy the if statement and print out value. How do I ensure that a
> string is caught as a ValueError instead of being converted?
It depends on what you want to do
I am trying to do a simple test but am not sure how to get around ASCII
conversion of characters. I want to pass in y have the function test to see
if y is an integer and print out a value if that integer satisfies the if
statement. However, if I pass in a string, it's converted to ASCII and will
s
On Mon, Jan 30, 2012 at 5:41 PM, William Stewart wrote:
> thanks I havent learned anything about prgramming its a computer sicence
> class, I will try the links
> thanks again
>
> --- On *Mon, 1/30/12, Joel Goldstick * wrote:
>
>
> From: Joel Goldstick
> Subject: Re: [Tutor] New user Knows noth
On Mon, Jan 30, 2012 at 2:21 PM, Jerry Hill wrote:
> On Mon, Jan 30, 2012 at 2:02 PM, William Stewart
> wrote:
>> I have no Idea how to start this task I have never used ANY programming
>> programs before And I dont Know the language either
>> The online help files from python Did not help a bit
On Mon, Jan 30, 2012 at 2:02 PM, William Stewart
wrote:
> I have no Idea how to start this task I have never used ANY programming
> programs before And I dont Know the language either
> The online help files from python Did not help a bit
Here's a few resources that might get you started.
Firs
hello
I am trying to make a math functions program which includes
ADDITION: 2+2=4
SUBTRACTION: 4-2=2
MULTIPLICATION: 4*2=8
DIVISION: 4/2=2
EXPONENT: 2**3=8
REMAINDER: 5%2=1
I have no Idea how to start this task I have never used ANY programming
programs before And I dont Know the language eit
George Nyoro wrote:
Hey all, again:
Thanks for the delete thing. Helped with that problem a lot. Especially the
getattr thing came in handy.
Question 1:
How do you guys indent and put in the triple greater than signs and all
that when sending mail? Manually? Coz the last mail I sent was using th
de = LEFT, padx = 10, pady = 10)
> .(Some more lines)
> C.mainloop()
>
>
> Because I am getting stuck in a loop. The client is keep on connecting
> to server without creating a GUI.
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---
Hey all, again:
Thanks for the delete thing. Helped with that problem a lot. Especially the
getattr thing came in handy.
Question 1:
How do you guys indent and put in the triple greater than signs and all
that when sending mail? Manually? Coz the last mail I sent was using the
gmail indent thing a
Surya K wrote:
I am on windows. So, as msvcrt is for windows, I wonder if there
is any module that works for both,
http://code.activestate.com/recipes/577977
--
Steven
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription opt
On 2012/01/30 07:20 AM, Surya K wrote:
I want to run code until a "enter" is pressed. Well, it shouldn't wait
for the user to enter "enter"
This is my code:
import msvcrt
chr = 0
while chr != 'q':
print "my code",
if msvcrt.kbhit():
chr = msvcrt.getch()
This isn't workin
On 30/01/12 05:20, Surya K wrote:
I want to run code until a "enter" is pressed. Well, it shouldn't wait
for the user to enter "enter"
This is my code:
import msvcrt
chr = 0
while chr != 'q':
print "my code",
if msvcrt.kbhit():
chr = msvcrt.getch()
You shouldn't need the kbhit test.
Try jus
Surya K wrote:
> I want to run code until a "enter" is pressed. Well, it shouldn't wait for
> the user to enter "enter" This is my code:
This is what it looks like over here:
> import msvcrtchr = 0while chr != 'q': print "my code", if
> msvcrt.kbhit(): chr = msvcrt.getch()
Th
17 matches
Mail list logo