May-14-2019, 01:40 PM
Ascii table shows how numbers are stored in the memory
[Image: asciifull.gif]
Here's how math.floor can be used:
[Image: asciifull.gif]
chr(number)
function allows you to convert number into character. Here's example:hello_world_numbers = [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100] print("".join(chr(n) for n in hello_world_numbers))
Output:hello world
If that doesn't make much sense you can take print 1 chr() at once and get similar result like:print( chr(104), chr(101), chr(108), chr(108), chr(111), chr(32), chr(119), chr(111), chr(114), chr(108), chr(100) )
Output:h e l l o w o r l d
To get the block number you can use division, math.floor
function and add 65 as suggested in previous post, to get the floor number you can use "modulo" operation.Here's how math.floor can be used:
from math import floor print(floor(10.21312312))
Output:10