If by user input line of code you mean going back to choosing an equation without having to leave the program then just move
d=raw_input("choose equation")
into the while loop. Maybe throw a 5th option in there that lets you break out of the loop for when you're done and want to quit the program.
Also I've never learned python 2.x, currently learning python3, but I see most people use
int(raw_input('input number: '))
to get the integer instead of
input('input number: ')
.
Another thing you can do if it's any use to you is using try/except to check whether the user input a number or not, that way the program doesn't crash without you wanting it to.