
760 So.2d 1256 (2000)
STATE of Louisiana
v.
Ronald ROSS.
No. 00-KA-27.
Court of Appeal of Louisiana, Fifth Circuit.
May 17, 2000.
*1257 Margaret S. Sollars, Louisiana Appellate Project, Thibodaux, Louisiana, Attorney for Appellant Ronald Ross.
Paul D. Connick, Jr., District Attorney, Terry M. Boudreaux, Kia Habisreitinger, Assistant District Attorneys, Gretna, Louisiana, Attorneys for Appellee State of Louisiana.
Panel composed of Judges JAMES L. CANNELLA and CLARENCE E. McMANUS and THOMAS C. WICKER, Jr., Pro Tempore.
CANNELLA, Judge.
Defendant, Ronald Ross, appeals from his conviction of distribution of cocaine and his sentence to seven years imprisonment at hard labor, five of which are to be served without benefit of parole, probation or suspension of sentence. For the reasons which follow we affirm the conviction and sentence.
On April 3, 1998, George Ansardi (Ansardi) of the Kenner Police Department was making undercover purchases of crack cocaine. At approximately 6:50 p.m. Ansardi drove to the corner of Cook and Palfrey Street and Defendant approached his passenger window. Ansardi rolled down the window and told Defendant that he was looking for a "twenty." Defendant took a rock of crack cocaine from his mouth and handed it to Ansardi in exchange for a $20 bill. At this point, Ansardi gave a signal to Officer Louis Weaver, who was in the back of the van viewing the transaction and Defendant was arrested.
On April 16, 1998, the Jefferson Parish District Attorney filed a bill of information charging Defendant with one count of distribution of cocaine, in violation of La. R.S. 40:967(A). At his arraignment on April 24, 1998, a plea of not guilty was entered for Defendant.
Defendant filed a motion to suppress evidence, a motion for ex parte drug addiction pre-sentence investigation, and several pro se discovery motions, including a motion for preliminary examination. On August 20, 1998, the trial court took up Defendant's pretrial motions. The trial court denied the motion for preliminary examination. The trial court continued until trial Defendant's motion to suppress. The trial court continued, without date, Defendant's motion for pre-sentence investigation. At the conclusion of this hearing, Defendant indicated that he wished to be tried by a judge and the trial court questioned him concerning the waiving of his right to trial by a jury. Thereafter, the trial court found that Defendant's waiver of a trial by jury was made knowingly and intelligently.
*1258 On August 21, 1999, trial was held. At the conclusion of trial, the Defendant was found guilty as charged.
Defendant's sentencing hearing was held on August 27, 1998. The trial judge sentenced Defendant to seven years imprisonment at hard labor with the first five years to be served without benefit of parole, probation, or suspension of sentence. During the sentencing hearing, Defendant filed a motion to reconsider sentence, which the trial judge denied. Defendant made an oral motion for appeal. Defendant filed a written motion for appeal, which was granted on the same day.
On appeal, Defendant assigns two errors.

ASSIGNMENT OF ERROR NUMBER ONE
Defendant argues that his conviction should be overturned because the evidence produced by the State at trial was insufficient to support a finding that he distributed cocaine. The State argues to the contrary that Defendant's conviction should be affirmed because the evidence presented did support a finding that he distributed cocaine.
The standard for testing the sufficiency of evidence requires that a conviction be based on proof sufficient for any rational trier of fact, viewing the evidence in the light most favorable to the prosecution, to find the essential elements of the crime beyond a reasonable doubt. Jackson v. Virginia, 443 U.S. 307, 319, 99 S.Ct. 2781, 2789, 61 L.Ed.2d 560, 573 (1979); State v. Hayden, 97-1070 (La.App. 5th Cir. 2/25/98), 707 So.2d 1360, 1364, writ denied, 98-0811 (La.9/4/97), 723 So.2d 960.
In the present case, Defendant was convicted of one count of distribution of cocaine in violation of La. R.S. 40:967(A)(1), which provides in pertinent part:
A. Manufacture; distribution. Except as authorized by this Part or by Part VII-B of Chapter 5 of Title 40 of the Louisiana Revised Statutes of 1950, it shall be unlawful for any person knowingly or intentionally:
(1) To produce, manufacture, distribute, or dispense or possess with intent to produce, manufacture, distribute, or dispense, a controlled dangerous substance classified in Schedule II....
Cocaine is classified in Schedule II. La. R.S. 40:964(A)(4).
The State called Agent Louis Weaver (Weaver) of the Westwego Police Department. He testified that, on April 3, 1998, he was acting as a cover officer for an undercover officer, Ansardi, who was buying narcotics. Weaver was hiding in the back of a van that the undercover officer was driving. A cardboard sheet separated the front from the rear of the van. Weaver was able to see what was happening in the front of the van through a small slit in the cardboard.
Weaver testified that a buy took place at approximately 6:50 p.m. at the corner of Cook and Palfrey Streets in Gretna. Ansardi drove up to the corner and asked a man standing there if he had a "twenty." The man then leaned into the passenger side window of the van and handed Ansardi a rock-like substance. Ansardi handed the man a $20 bill. At that point, Ansardi gave Weaver a signal and Weaver exited the side of the van and arrested the man who was still leaning into the van. Weaver identified the Defendant as the man who sold the rock of crack cocaine.
As stated above, Weaver's testimony was corroborated by Ansardi's testimony to the effect that a drug transaction took place where he was handed cocaine in exchange for a $20 bill.
The State also presented the testimony of Jefferson Parish Sheriffs Officer Edgar Dunn (Dunn), who was qualified as an expert in the field of forensic chemistry. Dunn testified that he examined a piece of plastic wrapped rock-like material that was given to him to analyze. He testified that the sealed container was marked with the complaint number. Dunn tested the rock-like *1259 material and found that it contained cocaine.
Defendant took the stand and denied that he intended to sell the rock to the undercover officer. He, instead, claimed that he simply showed the rock to the undercover officer and, although the officer showed him the $20 bill, the officer did not hand it to him. Defendant testified that he did not have cocaine for sale and that the cocaine he did have was for his own personal use. He also testified that the cocaine presented and identified at trial was not the same cocaine that he had at the time he was arrested.
When the trier-of-fact is confronted by conflicting testimony, the determination of the facts rests solely with that judge or jury, who may accept or reject, in whole or in part, the testimony of any witness. State ex rel. Graffagnino v. King, 436 So.2d 559, 563 (La.1983); State v. Lewis, 98-447 (La.App. 5th Cir. 10/28/98), 720 So.2d 1230, 1233. Both this Court and the Louisiana Supreme Court have held that it is not the function of the appellate court to assess the credibility of witnesses or reweigh the evidence. State ex rel. Graffagnino, 436 So.2d at 563; Lewis, 98-447 at p. 7, 720 So.2d at 1233.
In the present case, it is clear that the trial court accepted the police officers' version of events that a sale of one rock of crack cocaine took place. Based on this direct testimony, we find that the State presented sufficient evidence to support the finding that the Defendant distributed cocaine.
This assignment of error lacks merit.

ASSIGNMENT OF ERROR NUMBER TWO
Defendant argues that the sentence imposed should be vacated and his case remanded for resentencing because the sentence is constitutionally excessive.
Both the United States and Louisiana Constitutions prohibit the imposition of excessive or cruel punishment. U.S. Const. Amend. 8; La. Const. of 1974, art. I, § 20. A sentence is generally considered excessive if it is grossly disproportionate to the offense or imposes needless and purposeless pain and suffering. State v. Lobato, 603 So.2d 739, 751 (La.1992); State v. Richmond, 98-1015 (La.App. 5th Cir. 3/10/99), 734 So.2d 33, 38; State v. Daigle, 96-782 (La.App. 5th Cir. 1/28/97), 688 So.2d 158, 159, writ denied, 97-0597 (La.9/5/97), 700 So.2d 506. A sentence is grossly disproportionate if, when the crime and punishment are considered in light of the harm done to society, it shocks the sense of justice. The sentence will not be set aside absent a showing of abuse of the trial court's wide discretion to sentence within statutory limits. State v. Richmond, 98-1015 at p. 8, 734 So.2d at 38; State v. Daigle, 96-782 at p. 2, 688 So.2d at 159.
The penalties for distribution of cocaine, set out in La. R.S. 40:967(B)(4)(b), state that:
Distribution, dispensing, or possession with intent to produce, manufacture, distribute or dispense cocaine or cocaine base or a mixture or substance containing cocaine or its analogues as provided in Schedule II(A)(4) of R.S. 40:964 shall be sentenced to a term of imprisonment at hard labor for not less than five years nor more than thirty years, with the first five years of said sentence being without benefit of parole, probation, or suspension of sentence; and may, in addition, be sentenced to pay a fine of not more than fifty thousand dollars.
In the present case, during the hearing on Defendant's motion for a bill of particulars, the State informed defense counsel in open court that Defendant had eight felony arrests with no previous convictions, 44 misdemeanor arrests with two previous convictions, and 96 city arrests with eight convictions. Based on Defendant's record and the sentencing range for the offense, we find that the trial judge did not abuse his discretion in imposing a sentence in the *1260 lower end of the sentencing range. The sentence imposed is not excessive.
This assignment of error lacks merit.

ERROR PATENT DISCUSSION
The record was reviewed for errors patent, according to LSA-C.Cr.P. art. 920; State v. Godejohn, 425 So.2d 750 (La.1983); State v. Oliveaux, 312 So.2d 337 (La.1975); and State v. Weiland, 556 So.2d 175 (La. App. 5th Cir.1990). No errors were found.
Accordingly, for the reasons set forth above, we affirm the conviction of the Defendant for distribution of cocaine and the sentence to seven years imprisonment at hard labor, the first five of which are to served without benefit of parole, probation or suspension of sentence.
CONVICTION AND SENTENCE AFFIRMED.
