![]() |
|
#2
|
|||
|
|||
|
You can use the round function to round a floating point number to the nearest integer value:
Code:
value = 5.3 if round(value) == 5.0: print 'Is equal to 5' |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Converting a character to a number | jassel41 | Vizard | 1 | 02-10-2010 08:37 AM |