Group 6·CITY OF ILAGAN
My Number: 15
Why: I picked this number because it's my student number.
| 15 // 2 = 7 | 15 % 2 = 1 |
| 7 // 2 = 3 | 7 % 2 = 1 |
| 3 // 2 = 1 | 3 % 2 = 1 |
| 1 // 2 = 0 | 1 % 2 = 1 |
Binary representation: 1111
My loop's answer and Python's own answer agree.
| Number | Binary | Octal | Hex |
|---|---|---|---|
| 15 | 0b1111 | 0o17 | 0xf |
| 16 | 0b10000 | 0o20 | 0x10 |
| 17 | 0b10001 | 0o21 | 0x11 |
| 18 | 0b10010 | 0o22 | 0x12 |
| 19 | 0b10011 | 0o23 | 0x13 |
| 20 | 0b10100 | 0o24 | 0x14 |
| 21 | 0b10101 | 0o25 | 0x15 |
| 22 | 0b10110 | 0o26 | 0x16 |
| 23 | 0b10111 | 0o27 | 0x17 |
| 24 | 0b11000 | 0o30 | 0x18 |
| 25 | 0b11001 | 0o31 | 0x19 |
| 26 | 0b11010 | 0o32 | 0x1a |
| 27 | 0b11011 | 0o33 | 0x1b |
| 28 | 0b11100 | 0o34 | 0x1c |
| 29 | 0b11101 | 0o35 | 0x1d |
| 30 | 0b11110 | 0o36 | 0x1e |
This page was built by Python the moment you asked for it.