-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRough.py
More file actions
25 lines (22 loc) · 709 Bytes
/
Rough.py
File metadata and controls
25 lines (22 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# def print_formatted(number):
# for i in range (1,(number+1)):
# print(f"{i:>2} {oct(i).split('o')[1]:>2} {hex(i).split('x')[1].capitalize():>2} {bin(i).split('b')[1]:>2}")
# def print_formatted(number):
# binary_len = len('{:b}'.format(number))
# for _ in range(1, number+1):
# for base in 'doXb':
# print('{0:{width}{base}}'.format(_, base=base, width=binary_len), end=' ')
# print()
#
#
#
#
# if __name__ == '__main__':
# n = int(input())
# print_formatted(n)
#
# n = int(input())
# width = len("{0:b}".format(n))
# print (width)
# for i in range(1,n+1):
# print ("{0:{width}d} {0:{width}o} {0:{width}X} {0:{width}b}".format(i, width=width))