comparison lame.py @ 41:d129c3d0e920 draft default tip

planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
author richard-burhans
date Mon, 28 Jul 2025 14:35:28 +0000
parents
children
comparison
equal deleted inserted replaced
40:b095c69eab5b 41:d129c3d0e920
1 #!/usr/bin/env python3
2
3 for i in range(0, 16):
4 hex_value = f"{i:0x}"
5 bin_value = f"{i:04b}"
6 ones = len(bin_value.replace("0", ""))
7
8 print(f'{ones}')
9
10
11
12 # 0 0000 0
13 # 1 0001 1
14 # 2 0010 1
15 # 3 0011 2
16 # 4 0100 1
17 # 5 0101 2
18 # 6 0110 2
19 # 7 0111 3
20 # 8 1000 1
21 # 9 1001 2
22 # a 1010 2
23 # b 1011 3
24 # c 1100 2
25 # d 1101 3
26 # e 1110 3
27 # f 1111 4
28