how can a person know which model iPad he/she is using? is there any code to ensure about

Options
how can a person know which model iPad (iPad2 or, iPad3....) he/she is using? is there any code to ensure about it!!