update
This commit is contained in:
parent
2992f4f408
commit
4f46de8d00
3330 changed files with 394553 additions and 76939 deletions
15
.config/Code/User/History/-2e3f41b4/FdKD.py
Normal file
15
.config/Code/User/History/-2e3f41b4/FdKD.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
from base_conversion_kit import convert_to_base_n
|
||||
|
||||
def convert_to_coded_base(x: int, base: int, code: str) -> str:
|
||||
based = convert_to_base_n(int(x), base)
|
||||
for i in range(base):
|
||||
print(str[i])
|
||||
based.replace(str(i), code[i])
|
||||
return based
|
||||
|
||||
|
||||
num_code = input('enter your number code: ')
|
||||
name_code = input('enter your name code: ')
|
||||
|
||||
a = convert_to_coded_base(5, 3, "7584")
|
||||
print(a)
|
Loading…
Add table
Add a link
Reference in a new issue