Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 2

84 bytes added, 08:34, 26 May 2017
PART 2 - Using IF/ELIF/ELSE Statements
:#Open an ipython3 shell:<source>
ipython3
</source>:#Using if statements to do numeric comparisonsLet's perform an IF statement testing a condition of two variable values. In this case, if variable 'a' is greater than variable 'b', this then print a message, if statements condition will be TrueFalse, do nothing.:#Issue the following at the ipython3 shell:<source>
a = 10
b = 15
13,420
edits