L
L
LoonTiG2016-04-03 16:04:32
Python
LoonTiG, 2016-04-03 16:04:32

What does the 0xA number format mean?

What does it mean to write a value in Python as in the example:
z = random.randint(0x4.0x23)
what exactly does 0x4.0x23 mean and how to use it?
Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Tikhonov, 2016-04-03
@LoonTiG

This is the hexadecimal system. Google it. 0x00 - 0, 0x01 - 1, etc.
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F.
The entry means - set the variable z to a random value in the range from 4 to 23.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question