khadddijahh

khadddijahh
:)

Monday, April 11, 2011

What is a variable? How are variable represented in Scratch? What are the two types of variables and how can they be used? What is a Boolean variable?

What is a variable?

A variable is something that can be changed, such as a characteristic or value. Variables are generally used in psychology experiments to determine if changes to one thing result in changes to another.

How are variable represented in Scratch?

With statements, Boolean expressions, conditions, loops, and variables now under your belt as building blocks, we can now explore two higher-level programming constructs, starting with threads.

What are the two types of variables and how can they be used?


We can distinguish between two types of variables according to the level of measurement:

1. Continuous or Quantitative Variables.
2. Discrete or Qualitative Variables.

What is a Boolean variable?

A Boolean variable can be used to hold the integer values 0 or 1, or the C++ literals true and false, which are implicitly promoted to the integers 0 and 1 whenever an arithmetic value is necessary. The type specifier to declare a Boolean variable is bool in C++. To declare a Boolean variable in C, use the bool macro, which is defined in the header file . A Boolean variable may not be further qualified by the specifiers signed, unsigned, short, or long.

No comments:

Post a Comment