Examlex

Solved

Consider the Following Pseudocode, What Does It Produce

question 27

Multiple Choice

Consider the following pseudocode, what does it produce?
Set n = 1.
Set p = 1.
Repeat until n equals 6
Multiply p by n and store result in p.
Add 1 to n.
Print p.


Definitions:

Counterconditioning

A behavior therapy technique used to replace an undesirable response to a stimulus with a more desirable one.

Shaping

A method in behavioral psychology used to gradually train a new behavior by reinforcing successive approximations to the desired behavior.

Premack Principle

A principle in psychology that states that more probable behaviors will reinforce less probable behaviors.

Negative Reinforcement

The removal of a stimulus to increase the probability that a behavior will be repeated.

Related Questions