A man has been charged with attempting to assassinate US President Barack Obama.

The 21-year-old is accused of firing two shots at the White House from a rifle a week ago.

The President was away in California at the time.