Trouble with moving a object with the WSAD keys

So I have recently started to learn how to progam in unity with C#.And I have been having some issues with being able to move a object (named player) with WSAD (like I am not able to move the object at all).The two errors are

Assets\ wasd1.cs(13,6):error CS1513: } expected

and

Assets\wasd1e.cs(30,1): error CS1022: Type or namespace definition, or end-of-file expected

The code for the key bindings are:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AddComponetExample : Rigidbody
{
}

public class Wasd1e : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        public GameObject player;
    }

    // Update is called once per frame
    void Update()
    {
        Rigidbody rb = GetComponent<Rigidbody>();
        if (Input.GetKey(KeyCode.A))
            rb.AddForce(Vector3.left);
        if (Input.GetKey(KeyCode.D))
            rb.AddForce(Vector3.right);
        if (Input.GetKey(KeyCode.W))
            rb.AddForce(Vector3.up);
        if (Input.GetKey(KeyCode.S))
            rb.AddForce(Vector3.down);
    }
}

The code for the movement is

using UnityEngine;
using System.Collections;


public class ExampleClass : MonoBehaviour
{
    public GameObject player;

    CharacterController characterController;

    public float speed = 6.0f;
    public float jumpSpeed = 8.0f;
    public float gravity = 20.0f;

    private Vector3 moveDirection = Vector3.zero;

    void Start()
    {
        characterController = GetComponent<CharacterController>();
    }

    void Update()
    {
        if (characterController.isGrounded)
        {

            moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0.0f, Input.GetAxis("Vertical"));
            moveDirection *= speed;

            if (Input.GetButton("Jump"))
            {
                moveDirection.y = jumpSpeed;
            }
        }

        moveDirection.y -= gravity * Time.deltaTime;

        characterController.Move(moveDirection * Time.deltaTime);
    }
}

So how should I fix the code in order for the WSAD keys to move the object?
Thank you for your time reading this

In Wasd1e’s Start method you are declaring a public variable inside a method. You can’t do that. You’re also getting the Rigidbody component over and over every call to Update. That is bad for performance. Instead you should cache the result. You’re adding forces in Update when forces should be added in FixedUpdate (getting the key presses still needs to stay in Update though). I don’t know what AddComponetExample is doing in that file. The filename wasd1e.cs is starting with a lower case letter, but the class is starting with an upper case. Monobehaviour classes need to be in a file which is named exactly the same as the class. Case matters in C#.

Do you realize the filename wasd1.cs you have starting with a space?

You say Wasd1e is for key bindings, but there is nothing regarding key bindings in the code you posted. What you’ve posted directly checks for key presses and adds forces to a rigidbody, implementing physics based movement. In ExampleClass though you’re trying to do movement using a CharacterController. You need to choose which kind of movement you’re going to use. Pick one. (There’s basically 3 kinds of movement in Unity. Physics using a Rigidbody, using a CharacterController, and manipulating the transform’s position directly. You choose one of the 3 based on your requirements, and generally don’t try to implement more than one at the same time on the same object unless you know exactly what you’re doing)