21.11.2014 Views

Python Programming

Python Programming

Python Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Python</strong> <strong>Programming</strong><br />

Basics<br />

Control Flow syntax<br />

If statement:<br />

>>> x = -6<br />

>>> if x > 0:<br />

... print "Positive“<br />

... elif x == 0:<br />

... print "Zero“<br />

... else:<br />

... print "Negative“<br />

...<br />

'Negative'<br />

30<br />

HP CONFIDENTIAL - ENABLEMENT ONLY, NOT FOR CUSTOMER USE.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!