Changes

Jump to: navigation, search

OPS435 Python Lab 1

8 bytes added, 09:09, 16 May 2017
Integer Variables
:#Now we will make a new variable and try some math:<source>
sum = num1 + num2
</source><br>This will add the values contained in the variables together, providing a sum. However you will note that there is no output. First lets inspect the new value.<br><br>
:#Enter the following command:<source>
sum
</source><br>Does this value look right? If we wanted to print this out to the screen we could use the following python code.<br><br>
:#Enter the following function:<source>
print(sum)
13,420
edits

Navigation menu