A simple 2D pong game doesn't run

So Hi, fairly new to the Unity.I was watching a tutorial on how to make a small 2D game called Pong, its really simple.I created the objects and even wrote the C# program properly.
the program is basically just to move my paddle up and down
using UnityEngine;
using System.Collections;

public class paddle : MonoBehaviour {

public float paddlespeed = 1;
public Vector3 playerPos;

	void Update ()
	float yPos = gameObject.transform.position.y + (Input.GetAxis ("Vertical") * paddlespeed);
	playerPos = new Vector3 (-20, Mathf.Clamp(yPos,-11,11),0);
	gameObject.transform.position = playerPos;

but when I run the game,it doesn’t do anything.What am I missing ?

Have you attached the script to a gameobject in the scene? after doing that you should also define in the editor the playerPos.

Both actions can be made by drag and drop, by dragging the script to an object in the scene and dragging your playerPos to the property showed in the editor