im having alot of trouble with these letter questions

How many arrangements can be made by the letters of the word definition if the letters i do not occupy the first or last place

and how many arrangements of the letters of the word PARRAMATTA are possible

i dont no how to approach that first question and for the second one i thought it was just 10!/8 but the answer is 37800

thankyou for any help given.