10Brainfuck

From Esolang
Jump to navigation Jump to search

10Brainfuck

10Brainfuck is going to be my first contribution as far as esolangs are concerned. First of all programs are actually going to be written in numbers 1 ~ 8. The codes are as follow:

  • 1 gets translated into '>'
  • 2 gets translated to '<'
  • 3 becomes '+'
  • 4 becomes '-'
  • 5 goes to '.'
  • 6 -> ','
  • 7 -> '['
  • and finally 8 becomes ']'

Here's a python program that translates 10Brainfuck into brainfuck (former), and vice versa (latter).

   code = input('Enter 10Brainfuck code: ')
   chars = {'1': '>', '2': '<', '3': '+', '4': '-', '5': '.', '6': ',', '7': '[', '8': ']'}
   for i in chars.keys():
       code = code.replace(i, chars[i])
   print(code)
   code = input('Enter Brainfuck code: ')
   chars = {'>': '1', '<': '2', '+': '3', '-': '4', '.': '5', ',': '6', '[': '7', ']': '8'}
   for i in chars.keys():
       code = code.replace(i, chars[i])
   print(code)

Note

Isn't the same as Numberfuck??