Write a script that takes in either a binary or decimal number and converts it to either decimal or binary respectively. The program should first ask whether to convert to binary or decimal and should not use the built in bin2dec or dec2bin functions