78.3k views
4 votes
1. You can think of a/an _____ as a box that can hold values.

2. _____ are instructions that do not evaluate to any value.
3. If you try to use a variable before it is created, Python will generate a/an _____.
4. You can store values inside variables with the "=" sign (called the _____ operator).
5. Variables store _____, not expressions.
6. Replacing the value in a variable with a new value is called _____ the value.
7. The _____ time you store a value in a variable Python creates the variable.

User Florence
by
5.3k points

1 Answer

1 vote

Answer:

1. variable

2. Statements

3. Name Error (NameError)

4. assignment

5. values

6. assigning

7. first

Step-by-step explanation:

1. A variable act like names for values in programming. When we need to reference the value they hold, we call on the name of the variable.

2. Statements are built in instructions that tell the interpreter what to do. An example is print().

3. Python is more dynamic than some other programming languages like java when creating a variable. A specific data type does not need to be assigned to a variable before it is created, but the variable MUST be created before it is used or python will generate a NameError.

4. = is known as the assignment operator. For example if a variable

name = "James" you have stored James in the "name" variable.

5. Variables store values. Expressions are groups of values and operators that tell the interpreter what kind of action to carry out.

An example is name + surname where "name" and "surname" are variables holding values and + is an operator. So you can say variables are part of the building blocks of Expressions.

6. Giving a new value to a variable is known as assigning. The old value is deleted from memory and the variable holds the new value.

7. You can create a variable by storing a value in it for the first time.

User Caffaddt
by
5.4k points