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 octal. The octal 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 brainfuck into 10Brainfuck.

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

I haven't tested it but it should work.