Finished code for prompts and calculations.