Changes

Jump to: navigation, search

OPS435 Python Lab 4

1 byte removed, 10:07, 23 June 2017
PART 3 - String Formatting Advanced Features
number2 = -50
number3 = 1.50
print('{0:f}'.format(number1)) # The "0 " is the position just like other format() functionsprint('{0:f}'.format(number2)) # The A colon separate the postionposition/index areas from the extra functionalityprint('{0:f}'.format(number3)) # The "f stands for " represents the fixed point number
</source>
:#A fixed point number means that it can control the number of digits that come after the decimal point, try changing the '''.2''' to any other number and experiment<source>
13,420
edits

Navigation menu