[Tutor] How to print a variable from an if/else statement
jsantos.lazer at gmail.com
Wed Sep 12 12:39:23 CEST 2012
> Message: 3
> Date: Wed, 12 Sep 2012 09:32:38 +0000
> From: chrisbva81 at gmail.com
> To: tutor at python.org
> Subject: [Tutor] How to print a variable from an if/else statement
> 2019341514- at b3.c12.bise6.blackberry>
> Content-Type: text/plain
> I'm very new thanks in advance for your help.
> My If statement is:
> If age < (40):
> Print("you are young.")
> Print("You look great.")
> Basically what I want to do is have a sentence using print that includes
> the results of the If or Else which is based on the users input of age.
> I don't know if I'm doing something wrong by doing it this way. I can't
> figure it out.
> Sent via BlackBerry by AT&T
My first time answering the list!!! (sorry for this outburst!)
>From my limited knowledge your if/else statement is correct BUT your print
should start with lower caps, that's why it's not working.
You can see here a bunch of examples on how to use it properly ->
Hope this helps!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor