Take photo with camera
a) sudo raspistill -o image.jpg -w 640 -h 480 2>&1
the camera preview should popup on the screen and after a few seconds a pic should be taken and stored in the current directory with the name image.jpg
b) Python Code

  

import picamera
from time import sleep

camera = picamera.PiCamera()
camera.start_preview()
camera.capture('image1.jpg')
sleep(5)
camera.capture('image2.jpg')
camera.stop_preview()