[Tutor] gmail

2007-05-29 Thread Adam Urbas

Hey,

I have gmail now, but I'm not sure how to turn off HTML.
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] gmail

2007-05-29 Thread Richard Querin
On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I have gmail now, but I'm not sure how to turn off HTML.
>
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>


When you're typing in your email, you should see a '<< Plain text'
button link on the upper left. This will put you in plain text mode.
Likewise you'll see a similar button to switch back to 'Rich
Formatting>>' mode from there.

RQ
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] trouble with "if"

2007-05-29 Thread adam urbas
The scary part is, I think I understand this.  I copied your last example and 
put it in IDLE and it doesn't like you code.  Never mind.  I figured it out.  
So that is so it will notify you if your choice is invalid.  Nice lil tidbit of 
information there.  I'll be sure to use this.  Oh and while your here, I'd like 
to ask about loops I guess they are.  I want to have the program go back to the 
part where it asks for the user to select an option after it has run one of its 
if statements.Like, when the user tells it, "circle," then "radius," then 
enters the radius: here I would like the program to go back and ask the user if 
they want to do anything else, like find the area of a square, instead of the 
circle.  Would I have to tell python to print all those selections again, or 
would there be a way to just return to the beginning?Thanks,Au> Date: Sun, 27 
May 2007 15:10:08 -0400> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: 
tutor@python.org> Subject: Re: [Tutor] trouble with "if"> > adam urbas said 
unto the world upon 05/27/2007 01:49 PM:> > Thank you for the help Brian.  I 
would like to ask you about these> > things.  Which one of the examples you 
gave would be most fool> > proof.> >  readable>> > > Hi Adam and all,> > Adam was asking 
about how to use raw_input to drive a basic command > prompt menu system. I'd 
tried to explain that raw_input returns > strings, so his if tests which were 
something like:> > choice = raw_input("Enter an option)> if choice == 1:>  
do_option_1_stuff()> elif choice == 2:>  do_option_2_stuff()> > were not 
going to work, as choice will never be equal to an int.> > I'd sketched a few 
ways to deal with this, chiefly applying int() to > choice or comparing choice 
to '1', etc.> > That's more of less the gist of the above snippage and takes us 
more > or less up to the point where Adam asked his question above.> > I'm 
going to show you a few things that might be new to you, Adam. > Let's build up 
in steps.> > As a first pass, I would do the following:> > choice = 
int(raw_input("Please make your choice "))> > if choice == 1:>  # Option 1 
code here>  print "In option 1"> > elif choice == 2:>  # Option 2 code 
here>  print "In option 2"> > # Carry on if-test as needed (or until you 
get to the point> # of learning about dictionary dispatch :-)> > That will be 
fine, until your user enters something silly:> >   Please make your choice 
I like bikes!> Traceback (most recent call last):>File 
"/home/brian/docs/jotter/python_scraps/adamcode.py", line 1, > in > 
 choice = int(raw_input("Please make your choice "))> ValueError: invalid 
literal for int() with base 10: 'I like bikes!'>   > That's no good!> > So, 
we can use Python's exception handling tools to make this a bit > better.> > > 
try:>  choice = int(raw_input("Please make your choice "))> except 
ValueError:>  print "Please make a choice from the options offered."> > > 
if choice == 1:>  print "In option 1"> > elif choice == 2:>  print "In 
option 2"> > > There is still a problem, though:> >  >>> # Make sure the 
previous value assigned to choice is gone.>  >>> del(choice)>   Please make 
your choice I like Bikes> Please make a choice from the options offered.> 
Traceback (most recent call last):>File 
"/home/brian/docs/jotter/python_scraps/adamcode.py", line 7, > in > 
 if choice == 1:> NameError: name 'choice' is not defined>   > We've 
printed the reminder to the user, but then have gone on to > compare the 
non-existent choice value to 1, and that doesn't work so > well. It isn't 
enough to make sure that choice isn't insane---we need > to make sure that 
there is a choice value at all.> > So, better still:> > > while True:>  
try:>  choice = int(raw_input("Please make your choice "))>  # 
If the previous line worked, end the while loop. If it did>  # not 
work, we won't get here, so the loop will keep looping.>  break>  
except ValueError:>  print "Please make a choice from the options 
offered."> > if choice == 1:>  print "In option 1"> > elif choice == 2:>
  print "In option 2"> > > Now we get the following:> > Please make your choice 
I like bikes!> Please make a choice from the options offered.> Please make your 
choice Please take this> Please make a choice from the options offered.> Please 
make your choice1> In option 1>   > > There is still a problem, though:> > 
Please make your choice 42>   > Our sanity check has only insisted that the 
user enter a value that > can be turned into an int; nothing as yet makes it be 
one of the ints > we are expecting.> > So, try this:> > while True:>  try:> 
 choice = int(raw_input("Please make your choice "))>  if 
choice < 1 or choice > 2: # Adjust to suit options>  raise 
ValueError>  break>  except ValueError:>  print "Please 
make a choice from the options offered.">

Re: [Tutor] gmail

2007-05-29 Thread jim stockford

i'd be curious to see what happens if you
use the  tag around your (properly)
indented code, e.g.


this = 1
that = 0
if this == 1 :
that = 1
print that




On May 29, 2007, at 9:24 AM, Adam Urbas wrote:

> Hey,
>
> I have gmail now, but I'm not sure how to turn off HTML.
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] trouble with "if"

2007-05-29 Thread Brian van den Broek
adam urbas said unto the world upon 05/29/2007 12:39 PM:
> The scary part is, I think I understand this.  I copied your last
> example and put it in IDLE and it doesn't like you code.  Never
> mind.  I figured it out.  So that is so it will notify you if your
> choice is invalid.  Nice lil tidbit of information there.  I'll be
> sure to use this.  Oh and while your here, I'd like to ask about
> loops I guess they are.  I want to have the program go back to the
> part where it asks for the user to select an option after it has
> run one of its if statements.Like, when the user tells it,
> "circle," then "radius," then enters the radius: here I would like
> the program to go back and ask the user if they want to do anything
> else, like find the area of a square, instead of the circle.  Would
> I have to tell python to print all those selections again, or would
> there be a way to just return to the beginning?Thanks,Au> Date:


Hi Adam,

Again, I cut the mess, but I expect that if you use the gmail account 
you just posted about here on in, that will be the end of it.

I'm glad that you are starting to have the warm glow of understanding :-)

What you are asking about here is one reason why functions are so 
useful. They allow you (more or less) to give a name to a chunk of 
code, and then you can rerun that chunk at will by invoking the name.

Given the problem you want to solve, I'd structure my code something 
like the following. Most of the details need to be filled in, but this 
is the skeletal structure.


def welcome_message():
 # Some actions to invoke when the user starts the program
 print "Welcome to this program."

def display_menu():
 # Insert code for showing the user the menu of options
 pass

def circle_area():
 # insert code here to ask user for the radius, compute the area,
 # and display the result. You might well want to divide that up
 # into other functions that this one calls.
 pass

def square_area():
 # Likewise
 pass

# And so on, for each shape that you wish to handle

def exit_message():
 # Some actions to invoke when the user chooses to terminate
 # the program.
 print "Thank you for using this program. Goodbye."

def prompt_user():
 # Here is where the sort of code I showed you before would go.
 # I'd include an option, say 0, for exiting, which, when the
 # user picks it, you call exit_message()

 while True:
 try:
 choice = int(raw_input("Please make your choice "))
 if choice < 0 or choice > 2: # Adjust to suit options
 raise ValueError
 break
 except ValueError:
 print "Please make a choice from the options offered."

 # sends the choice back to the code that called prompt_user
 # We won't get here until a good choice has been made
 return choice

def main():
 # The main function driving your program. It might look
 # something like this:
 welcome_message()

 while True:   # This will loop forever until you break out
 display_menu()
 choice = prompt_user()

 if choice == 0:
 exit_message()
 break   # Terminate the while loop
 elif choice == 1:  # Assuming 1 was the option for circle
 circle_area()
 elif choice == 2:
 square_area()
 # And so on

 print "Please make another choice:"   # Go back to top of loop


if __name__ == '__main__':
 # This will run if you run the script, but not if you import it.
 main()


This has not been tested (it is only an outline) but it does pass the 
only so reliable eyeball check :-)

I'd suggest you try filling this sketch out to be useful, and post if 
you run into troubles.

Best,

Brian vdB
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] (no subject)

2007-05-29 Thread Treloar, Nick
how do you import sounds
 

This message is intended for the addressee named and may contain privileged 
information or confidential information or both. If you are not the intended 
recipient please delete it and notify the sender. 
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] gmail

2007-05-29 Thread Adam Urbas
Ok, I'm not sure if I'm in the right gmail.  When I type I don't see
any buttons that say rich text or plain text.  Only Send, Save Draft,
and Discard.

And I have no idea what jim is talking about.  Please clarify.

On 5/29/07, jim stockford <[EMAIL PROTECTED]> wrote:
>
> i'd be curious to see what happens if you
> use the  tag around your (properly)
> indented code, e.g.
>
> 
> this = 1
> that = 0
> if this == 1 :
>   that = 1
> print that
> 
>
>
>
> On May 29, 2007, at 9:24 AM, Adam Urbas wrote:
>
> > Hey,
> >
> > I have gmail now, but I'm not sure how to turn off HTML.
> > ___
> > Tutor maillist  -  Tutor@python.org
> > http://mail.python.org/mailman/listinfo/tutor
>
>
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] gmail

2007-05-29 Thread Brian van den Broek
Adam Urbas said unto the world upon 05/29/2007 11:57 PM:
> Ok, I'm not sure if I'm in the right gmail.  When I type I don't see
> any buttons that say rich text or plain text.  Only Send, Save Draft,
> and Discard.
> 
> And I have no idea what jim is talking about.  Please clarify.
> 
> On 5/29/07, jim stockford <[EMAIL PROTECTED]> wrote:
>>
>> i'd be curious to see what happens if you
>> use the  tag around your (properly)
>> indented code, e.g.
>>
>> 
>> this = 1
>> that = 0
>> if this == 1 :
>> that = 1
>> print that
>> 


Well, whatever you did when sending this one sent out a plain text 
email. (And there was much rejoicing.)

Jim suggested using an html tag to see if it helped your formatting. 
See here 

Best,

Brian vdB
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] [Fwd: Re: trouble with "if"]

2007-05-29 Thread Brian van den Broek
Forwarding to the list as I'm out of time on this one for now.

Adam, it is better to reply to all so that messages are sent to the 
list and not just the original sender. That way, more people can help, 
more people can learn, and you don't have to wait on one person to 
find the time.

Anticipating: when you are displaying a message in gmail, the top 
right-hand side of the message display window has a clickable `Reply'. 
Immediately beside that is a down pointing arrow. Click on that, and 
you will have a menu with an option `Reply to all.' That's the reply 
mechanism you want to use to reply to the list and the original sender 
rather than just the sender.

Best,

Brian vdB

 Original Message 
Subject: Re: [Tutor] trouble with "if"
Date: Tue, 29 May 2007 23:07:57 -0500
From: Adam Urbas <[EMAIL PROTECTED]>
To: Brian van den Broek <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>  
<[EMAIL PROTECTED]>

In the def welcome(), what do you put in the parentheses?  Another
question, what code do you use for ending the program.  I want the
user to be able to cancel the program from the main menu, where it
asks you to choose circle, square, etc.  Or even perhaps allow the
user to go back to a previous menu, well I suppose that would be the
def thing() code.  But what if they were at the part where the program
was asking them to input the radius, how would I give them the option
of returning to the list of given measurements of a circle?

On 5/29/07, Brian van den Broek <[EMAIL PROTECTED]> wrote:
> adam urbas said unto the world upon 05/29/2007 12:39 PM:
> > The scary part is, I think I understand this.  I copied your last
> > example and put it in IDLE and it doesn't like you code.  Never
> > mind.  I figured it out.  So that is so it will notify you if your
> > choice is invalid.  Nice lil tidbit of information there.  I'll be
> > sure to use this.  Oh and while your here, I'd like to ask about
> > loops I guess they are.  I want to have the program go back to the
> > part where it asks for the user to select an option after it has
> > run one of its if statements.Like, when the user tells it,
> > "circle," then "radius," then enters the radius: here I would like
> > the program to go back and ask the user if they want to do anything
> > else, like find the area of a square, instead of the circle.  Would
> > I have to tell python to print all those selections again, or would
> > there be a way to just return to the beginning?Thanks,Au> Date:
>
>
> Hi Adam,
>
> Again, I cut the mess, but I expect that if you use the gmail account
> you just posted about here on in, that will be the end of it.
>
> I'm glad that you are starting to have the warm glow of understanding :-)
>
> What you are asking about here is one reason why functions are so
> useful. They allow you (more or less) to give a name to a chunk of
> code, and then you can rerun that chunk at will by invoking the name.
>
> Given the problem you want to solve, I'd structure my code something
> like the following. Most of the details need to be filled in, but this
> is the skeletal structure.
>
>
> def welcome_message():
>  # Some actions to invoke when the user starts the program
>  print "Welcome to this program."
>
> def display_menu():
>  # Insert code for showing the user the menu of options
>  pass
>
> def circle_area():
>  # insert code here to ask user for the radius, compute the area,
>  # and display the result. You might well want to divide that up
>  # into other functions that this one calls.
>  pass
>
> def square_area():
>  # Likewise
>  pass
>
> # And so on, for each shape that you wish to handle
>
> def exit_message():
>  # Some actions to invoke when the user chooses to terminate
>  # the program.
>  print "Thank you for using this program. Goodbye."
>
> def prompt_user():
>  # Here is where the sort of code I showed you before would go.
>  # I'd include an option, say 0, for exiting, which, when the
>  # user picks it, you call exit_message()
>
>  while True:
>  try:
>  choice = int(raw_input("Please make your choice "))
>  if choice < 0 or choice > 2: # Adjust to suit options
>  raise ValueError
>  break
>  except ValueError:
>  print "Please make a choice from the options offered."
>
>  # sends the choice back to the code that called prompt_user
>  # We won't get here until a good choice has been made
>  return choice
>
> def main():
>  # The main function driving your program. It might look
>  # something like this:
>  welcome_message()
>
>  while True:   # This will loop forever until you break out
>  display_menu()
>  choice = prompt_user()
>
>  if choice == 0:
>  exit_message()
>  break   # Terminate the while loop
>  elif choice == 1:  # Assuming 1 was the option for circle
>  

[Tutor] [Fwd: Re: trouble with "if"]

2007-05-29 Thread Brian van den Broek
Another fwd, folks.

Brian vdB

 Original Message 
Subject: Re: [Tutor] trouble with "if"
Date: Tue, 29 May 2007 23:28:46 -0500
From: Adam Urbas <[EMAIL PROTECTED]>
To: Brian van den Broek <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>  
<[EMAIL PROTECTED]>  
<[EMAIL PROTECTED]>

I'm having trouble with the parentheses after the def thing().  IDLE
says that there is something wrong with it.  If I type something
between them, it says that there is something wrong with the quotation
marks.  If I just leave it like (), then it says that something is
wrong with what is after the parentheses.  Unless my code is supposed
to go between the parentheses.  I'll try that.

On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> In the def welcome(), what do you put in the parentheses?  Another
> question, what code do you use for ending the program.  I want the
> user to be able to cancel the program from the main menu, where it
> asks you to choose circle, square, etc.  Or even perhaps allow the
> user to go back to a previous menu, well I suppose that would be the
> def thing() code.  But what if they were at the part where the program
> was asking them to input the radius, how would I give them the option
> of returning to the list of given measurements of a circle?
>
> On 5/29/07, Brian van den Broek <[EMAIL PROTECTED]> wrote:
> > adam urbas said unto the world upon 05/29/2007 12:39 PM:
> > > The scary part is, I think I understand this.  I copied your last
> > > example and put it in IDLE and it doesn't like you code.  Never
> > > mind.  I figured it out.  So that is so it will notify you if your
> > > choice is invalid.  Nice lil tidbit of information there.  I'll be
> > > sure to use this.  Oh and while your here, I'd like to ask about
> > > loops I guess they are.  I want to have the program go back to the
> > > part where it asks for the user to select an option after it has
> > > run one of its if statements.Like, when the user tells it,
> > > "circle," then "radius," then enters the radius: here I would like
> > > the program to go back and ask the user if they want to do anything
> > > else, like find the area of a square, instead of the circle.  Would
> > > I have to tell python to print all those selections again, or would
> > > there be a way to just return to the beginning?Thanks,Au> Date:
> >
> >
> > Hi Adam,
> >
> > Again, I cut the mess, but I expect that if you use the gmail account
> > you just posted about here on in, that will be the end of it.
> >
> > I'm glad that you are starting to have the warm glow of understanding :-)
> >
> > What you are asking about here is one reason why functions are so
> > useful. They allow you (more or less) to give a name to a chunk of
> > code, and then you can rerun that chunk at will by invoking the name.
> >
> > Given the problem you want to solve, I'd structure my code something
> > like the following. Most of the details need to be filled in, but this
> > is the skeletal structure.
> >
> >
> > def welcome_message():
> >  # Some actions to invoke when the user starts the program
> >  print "Welcome to this program."
> >
> > def display_menu():
> >  # Insert code for showing the user the menu of options
> >  pass
> >
> > def circle_area():
> >  # insert code here to ask user for the radius, compute the area,
> >  # and display the result. You might well want to divide that up
> >  # into other functions that this one calls.
> >  pass
> >
> > def square_area():
> >  # Likewise
> >  pass
> >
> > # And so on, for each shape that you wish to handle
> >
> > def exit_message():
> >  # Some actions to invoke when the user chooses to terminate
> >  # the program.
> >  print "Thank you for using this program. Goodbye."
> >
> > def prompt_user():
> >  # Here is where the sort of code I showed you before would go.
> >  # I'd include an option, say 0, for exiting, which, when the
> >  # user picks it, you call exit_message()
> >
> >  while True:
> >  try:
> >  choice = int(raw_input("Please make your choice "))
> >  if choice < 0 or choice > 2: # Adjust to suit options
> >  raise ValueError
> >  break
> >  except ValueError:
> >  print "Please make a choice from the options offered."
> >
> >  # sends the choice back to the code that called prompt_user
> >  # We won't get here until a good choice has been made
> >  return choice
> >
> > def main():
> >  # The main function driving your program. It might look
> >  # something like this:
> >  welcome_message()
> >
> >  while True:   # This will loop forever until you break out
> >  display_menu()
> >  choice = prompt_user()
> >
> >  if choice == 0:
> >  exit_message()
> >  break   # Terminate the while loop
> >  elif choice == 1:  # Assuming 1 was the option for circle
> >   

Re: [Tutor] trouble with "if"

2007-05-29 Thread Adam Urbas
ok well, I'm testing to see if the CC thing worked.

On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> I'll try the CC thing.
>
> On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > Well, Brian, I am now very sure that we have different versions of
> > gmail, because on both the Quick Reply and the full reply screens,
> > there are no Reply buttons, or downpointing arrows.
> >
> > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > What is the actual command to exit the program.  I tried exit, which
> > > turned purple, so I know that does something.
> > >
> > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > No I don't think that worked either, because now it has a problem with
> > > > print.
> > > >
> > > > Please help.
> > > >
> > > > Au
> > > >
> > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > I'm having trouble with the parentheses after the def thing().  IDLE
> > > > > says that there is something wrong with it.  If I type something
> > > > > between them, it says that there is something wrong with the
> quotation
> > > > > marks.  If I just leave it like (), then it says that something is
> > > > > wrong with what is after the parentheses.  Unless my code is
> supposed
> > > > > to go between the parentheses.  I'll try that.
> > > > >
> > > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > > In the def welcome(), what do you put in the parentheses?  Another
> > > > > > question, what code do you use for ending the program.  I want the
> > > > > > user to be able to cancel the program from the main menu, where it
> > > > > > asks you to choose circle, square, etc.  Or even perhaps allow the
> > > > > > user to go back to a previous menu, well I suppose that would be
> the
> > > > > > def thing() code.  But what if they were at the part where the
> > program
> > > > > > was asking them to input the radius, how would I give them the
> > option
> > > > > > of returning to the list of given measurements of a circle?
> > > > > >
> > > > > > On 5/29/07, Brian van den Broek <[EMAIL PROTECTED]> wrote:
> > > > > > > adam urbas said unto the world upon 05/29/2007 12:39 PM:
> > > > > > > > The scary part is, I think I understand this.  I copied your
> > last
> > > > > > > > example and put it in IDLE and it doesn't like you code.
> Never
> > > > > > > > mind.  I figured it out.  So that is so it will notify you if
> > your
> > > > > > > > choice is invalid.  Nice lil tidbit of information there.
> I'll
> > be
> > > > > > > > sure to use this.  Oh and while your here, I'd like to ask
> about
> > > > > > > > loops I guess they are.  I want to have the program go back to
> > the
> > > > > > > > part where it asks for the user to select an option after it
> has
> > > > > > > > run one of its if statements.Like, when the user tells it,
> > > > > > > > "circle," then "radius," then enters the radius: here I would
> > like
> > > > > > > > the program to go back and ask the user if they want to do
> > > anything
> > > > > > > > else, like find the area of a square, instead of the circle.
> > > Would
> > > > > > > > I have to tell python to print all those selections again, or
> > > would
> > > > > > > > there be a way to just return to the beginning?Thanks,Au>
> Date:
> > > > > > >
> > > > > > >
> > > > > > > Hi Adam,
> > > > > > >
> > > > > > > Again, I cut the mess, but I expect that if you use the gmail
> > > account
> > > > > > > you just posted about here on in, that will be the end of it.
> > > > > > >
> > > > > > > I'm glad that you are starting to have the warm glow of
> > > understanding
> > > > > :-)
> > > > > > >
> > > > > > > What you are asking about here is one reason why functions are
> so
> > > > > > > useful. They allow you (more or less) to give a name to a chunk
> of
> > > > > > > code, and then you can rerun that chunk at will by invoking the
> > > name.
> > > > > > >
> > > > > > > Given the problem you want to solve, I'd structure my code
> > something
> > > > > > > like the following. Most of the details need to be filled in,
> but
> > > this
> > > > > > > is the skeletal structure.
> > > > > > >
> > > > > > >
> > > > > > > def welcome_message():
> > > > > > >  # Some actions to invoke when the user starts the program
> > > > > > >  print "Welcome to this program."
> > > > > > >
> > > > > > > def display_menu():
> > > > > > >  # Insert code for showing the user the menu of options
> > > > > > >  pass
> > > > > > >
> > > > > > > def circle_area():
> > > > > > >  # insert code here to ask user for the radius, compute the
> > > area,
> > > > > > >  # and display the result. You might well want to divide
> that
> > up
> > > > > > >  # into other functions that this one calls.
> > > > > > >  pass
> > > > > > >
> > > > > > > def square_area():
> > > > > > >  # Likewise
> > > > > > >  pass
> > > > > > >
> > > > > > > # And so on, for each shape that you wish to handle
> > > > > > >
> > > > > > > def exit_message():

Re: [Tutor] trouble with "if"

2007-05-29 Thread Adam Urbas
Dang it... I am really going to have to figure out how to reply all.
The cc thing only worked once and now I'm still sending to you.

On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> I started to read Alan Gauld's tutorial.  The problem is, once I get
> past the very basics of something, I tend to get impatient and don't
> want to go back and have to redo them, but the other problem is, I may
> need something that is taught in the basic sections.  So ya, I'll try
> to keep on a reading Alan's tutorial.
>
> On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > I have already subscribed.  I tried sending a message when I was not
> > yet subscribed, and the Moderator or Administrator, or whoever said to
> > resubscribe.  Sorry about my accident programming.
> >
> > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > ok well, I'm testing to see if the CC thing worked.
> > >
> > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > I'll try the CC thing.
> > > >
> > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > Well, Brian, I am now very sure that we have different versions of
> > > > > gmail, because on both the Quick Reply and the full reply screens,
> > > > > there are no Reply buttons, or downpointing arrows.
> > > > >
> > > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > > What is the actual command to exit the program.  I tried exit,
> which
> > > > > > turned purple, so I know that does something.
> > > > > >
> > > > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > > > No I don't think that worked either, because now it has a
> problem
> > > with
> > > > > > > print.
> > > > > > >
> > > > > > > Please help.
> > > > > > >
> > > > > > > Au
> > > > > > >
> > > > > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > > > > I'm having trouble with the parentheses after the def thing().
> > > IDLE
> > > > > > > > says that there is something wrong with it.  If I type
> something
> > > > > > > > between them, it says that there is something wrong with the
> > > > quotation
> > > > > > > > marks.  If I just leave it like (), then it says that
> something
> > is
> > > > > > > > wrong with what is after the parentheses.  Unless my code is
> > > > supposed
> > > > > > > > to go between the parentheses.  I'll try that.
> > > > > > > >
> > > > > > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > > > > > In the def welcome(), what do you put in the parentheses?
> > > Another
> > > > > > > > > question, what code do you use for ending the program.  I
> want
> > > the
> > > > > > > > > user to be able to cancel the program from the main menu,
> > where
> > > it
> > > > > > > > > asks you to choose circle, square, etc.  Or even perhaps
> allow
> > > the
> > > > > > > > > user to go back to a previous menu, well I suppose that
> would
> > be
> > > > the
> > > > > > > > > def thing() code.  But what if they were at the part where
> the
> > > > > program
> > > > > > > > > was asking them to input the radius, how would I give them
> the
> > > > > option
> > > > > > > > > of returning to the list of given measurements of a circle?
> > > > > > > > >
> > > > > > > > > On 5/29/07, Brian van den Broek <[EMAIL PROTECTED]>
> wrote:
> > > > > > > > > > adam urbas said unto the world upon 05/29/2007 12:39 PM:
> > > > > > > > > > > The scary part is, I think I understand this.  I copied
> > your
> > > > > last
> > > > > > > > > > > example and put it in IDLE and it doesn't like you code.
> > > > Never
> > > > > > > > > > > mind.  I figured it out.  So that is so it will notify
> you
> > > if
> > > > > your
> > > > > > > > > > > choice is invalid.  Nice lil tidbit of information
> there.
> > > > I'll
> > > > > be
> > > > > > > > > > > sure to use this.  Oh and while your here, I'd like to
> ask
> > > > about
> > > > > > > > > > > loops I guess they are.  I want to have the program go
> > back
> > > to
> > > > > the
> > > > > > > > > > > part where it asks for the user to select an option
> after
> > it
> > > > has
> > > > > > > > > > > run one of its if statements.Like, when the user tells
> it,
> > > > > > > > > > > "circle," then "radius," then enters the radius: here I
> > > would
> > > > > like
> > > > > > > > > > > the program to go back and ask the user if they want to
> do
> > > > > > anything
> > > > > > > > > > > else, like find the area of a square, instead of the
> > circle.
> > > > > > Would
> > > > > > > > > > > I have to tell python to print all those selections
> again,
> > > or
> > > > > > would
> > > > > > > > > > > there be a way to just return to the
> beginning?Thanks,Au>
> > > > Date:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Hi Adam,
> > > > > > > > > >
> > > > > > > > > > Again, I cut the mess, but I expect that if you use the
> > gmail
> > > > > > account
> > > > > > > > > > you just posted about here on in, that will be the end of
> > it.
> > > > > > > > > >
> > > > > > > > > > I'm glad that you are startin

Re: [Tutor] trouble with "if"

2007-05-29 Thread Grant Hagstrom

Right above the empty reply box is a "reply to all" link. Hit it, and you're
good to go.

On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote:


Dang it... I am really going to have to figure out how to reply all.
The cc thing only worked once and now I'm still sending to you.

On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> I started to read Alan Gauld's tutorial.  The problem is, once I get
> past the very basics of something, I tend to get impatient and don't
> want to go back and have to redo them, but the other problem is, I may
> need something that is taught in the basic sections.  So ya, I'll try
> to keep on a reading Alan's tutorial.
>
> On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > I have already subscribed.  I tried sending a message when I was not
> > yet subscribed, and the Moderator or Administrator, or whoever said to
> > resubscribe.  Sorry about my accident programming.
> >
> > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > ok well, I'm testing to see if the CC thing worked.
> > >
> > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > I'll try the CC thing.
> > > >
> > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > Well, Brian, I am now very sure that we have different versions
of
> > > > > gmail, because on both the Quick Reply and the full reply
screens,
> > > > > there are no Reply buttons, or downpointing arrows.
> > > > >
> > > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > > What is the actual command to exit the program.  I tried exit,
> which
> > > > > > turned purple, so I know that does something.
> > > > > >
> > > > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > > > No I don't think that worked either, because now it has a
> problem
> > > with
> > > > > > > print.
> > > > > > >
> > > > > > > Please help.
> > > > > > >
> > > > > > > Au
> > > > > > >
> > > > > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > > > > I'm having trouble with the parentheses after the def
thing().
> > > IDLE
> > > > > > > > says that there is something wrong with it.  If I type
> something
> > > > > > > > between them, it says that there is something wrong with
the
> > > > quotation
> > > > > > > > marks.  If I just leave it like (), then it says that
> something
> > is
> > > > > > > > wrong with what is after the parentheses.  Unless my code
is
> > > > supposed
> > > > > > > > to go between the parentheses.  I'll try that.
> > > > > > > >
> > > > > > > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
> > > > > > > > > In the def welcome(), what do you put in the
parentheses?
> > > Another
> > > > > > > > > question, what code do you use for ending the
program.  I
> want
> > > the
> > > > > > > > > user to be able to cancel the program from the main
menu,
> > where
> > > it
> > > > > > > > > asks you to choose circle, square, etc.  Or even perhaps
> allow
> > > the
> > > > > > > > > user to go back to a previous menu, well I suppose that
> would
> > be
> > > > the
> > > > > > > > > def thing() code.  But what if they were at the part
where
> the
> > > > > program
> > > > > > > > > was asking them to input the radius, how would I give
them
> the
> > > > > option
> > > > > > > > > of returning to the list of given measurements of a
circle?
> > > > > > > > >
> > > > > > > > > On 5/29/07, Brian van den Broek <[EMAIL PROTECTED]>
> wrote:
> > > > > > > > > > adam urbas said unto the world upon 05/29/2007 12:39
PM:
> > > > > > > > > > > The scary part is, I think I understand this.  I
copied
> > your
> > > > > last
> > > > > > > > > > > example and put it in IDLE and it doesn't like you
code.
> > > > Never
> > > > > > > > > > > mind.  I figured it out.  So that is so it will
notify
> you
> > > if
> > > > > your
> > > > > > > > > > > choice is invalid.  Nice lil tidbit of information
> there.
> > > > I'll
> > > > > be
> > > > > > > > > > > sure to use this.  Oh and while your here, I'd like
to
> ask
> > > > about
> > > > > > > > > > > loops I guess they are.  I want to have the program
go
> > back
> > > to
> > > > > the
> > > > > > > > > > > part where it asks for the user to select an option
> after
> > it
> > > > has
> > > > > > > > > > > run one of its if statements.Like, when the user
tells
> it,
> > > > > > > > > > > "circle," then "radius," then enters the radius:
here I
> > > would
> > > > > like
> > > > > > > > > > > the program to go back and ask the user if they want
to
> do
> > > > > > anything
> > > > > > > > > > > else, like find the area of a square, instead of the
> > circle.
> > > > > > Would
> > > > > > > > > > > I have to tell python to print all those selections
> again,
> > > or
> > > > > > would
> > > > > > > > > > > there be a way to just return to the
> beginning?Thanks,Au>
> > > > Date:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Hi Adam,
> > > > > > > > > >
> > > > > > > > > > Again, I cut the mess, but I expect that if you use
the
> > gmail
> > > > > > account
> > > > > >