<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Controlling a Servo Motor with The Raspberry Pi GPIO Port
Before proceeding double check your wiring.
Step1:  Set up the port as a PWM port with a 50Hz frequency
Step2:  Start at the 0 degree position (for most motors, this is a 2.5% duty cycle).
Step3:  Move that motor around.
<ASSISTANT_TASK:>
Python Code:
import RPi.GPIO as GPIO
import time
Explanation: Controlling a Servo Motor with The Raspberry Pi GPIO Port
Before proceeding double check your wiring.
End of explanation
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
p = GPIO.PWM(18, 50)
Explanation: Set up the port as a PWM port with a 50Hz frequency:
End of explanation
p.start(2.5)
Explanation: Start at the 0 degree position (for most motors, this is a 2.5% duty cycle).
End of explanation
p.ChangeDutyCycle(5.0)
p.ChangeDutyCycle(7.0)
p.ChangeDutyCycle(4.0)
time.sleep(0.2)
p.ChangeDutyCycle(10.0)
time.sleep(0.2)
p.ChangeDutyCycle(5.0)
time.sleep(0.2)
p.ChangeDutyCycle(7.0)
time.sleep(0.2)
p.stop()
GPIO.cleanup()
Explanation: Move that motor around.
End of explanation
<END_TASK>