Python Variable

In Python, a variable must be declared before it is assigned a value:

Correct! Wrong!

Variables need not be declared or defined in advance in Python. To create a variable, you just assign it a value.

Which of the following statements assigns the value 100 to the variable x in Python:

Correct! Wrong!

In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type:

Correct! Wrong!

Variables are not statically typed in Python, as they are in some other programming languages.

Python Variables

Share your Results: