Right!
The law of effect states that responses that produce a satisfying effect in a particular situation become more likely to occur again, while responses that produce a discomforting effect are less likely to be repeated.
Edward L. Thorndike first studied the law of effect by placing hungry cats inside puzzle boxes and observing their actions. He quickly realized that cats could learn the efficacy of certain behaviors and would repeat those behaviors that allowed them to escape faster.
The law of effect is at work in every human behavior as well. From a young age, we learn which actions are beneficial and which are detrimental through a similar trial and error process.
While the law of effect explains behavior from an external, observable point of view, it does not account for internal, unobservable processes that also affect the behavior patterns of human beings.
Source: Boundless. “Basic Principles of Operant Conditioning: Thorndike's Law of Effect.” Boundless Psychology. Boundless, 04 Jan. 2016. Retrieved 06 Jan. 2016 from https://www.boundless.com/psychology/textbooks/boundless-psychology-textbook/learning-7/operant-conditioning-47/basic-principles-of-operant-conditioning-thorndike-s-law-of-effect-196-12731/
Operant conditioning is a theory of learning that focuses on changes in an individual's observable behaviors. In operant conditioning, new or continued behaviors are impacted by new or continued consequences.