variable
A variable in Prolog is a string of letters, digits, and underscores (`_`) beginning either with a capital letter or with an underscore. Examples:
`X`, `Sister`, `_`, `_thing`, `_y47`, `First_name`, `Z2`
The variable `_` is used as a "don't-care" variable, when we don't mind what value the variable has. For example:
```is_a_parent(X) :- father_of(X, _). is_a_parent(X) :- mother_of(X, _).```
That is, X is a parent if they are a father or a mother, but we don't need to know who they are the father or mother of, to establish that they are a parent.

Variables are used in more than one way:

• to express constraints in parts of a rule:
`likes(A,B) :- dog(B), feeds(A,B).`
Note that both `A` and `B` appear on both sides of the neck symbol - the appearance of the same variable in two (or more places) in effect says that when the variable is bound to a value, it must be bound to the same value in all the places that it appears in a given rule.
Note that if the same variable appears in two or more different rules, it might be bound to different values in the different rules. This is achieved by Prolog renaming the variables internally, when it comes to use the rule - usually the names are things like `_1`, `_2`, `_3`, etc. This is why variables with names like these sometimes turn up in error messages when your Prolog program goes wrong.

• to formulate queries, as in the following example:
`?- studies(X, 9311).` Prolog responds by finding all the values for `X` for which `studies(X, 9311)` is true, and successively listing them, e.g.
```X = fred ;
X = jane ;
X = abdul ;
X = maria ;```