Q. In Python, a variable must be declared before it is assigned a
value:
• True
• False
Answer : False
Variables need not be declared or defined in advance in Python. To
create a variable, you just assign it a value.
Q. Which of the following statements assigns the value 100 to the
variable x in Python:
A. x << 100
B. x ← 100
C. x = 100
D. x := 100
Answer : C
Lecture4
Lecture4

Lecture4

  • 7.
    Q. In Python,a variable must be declared before it is assigned a value: • True • False
  • 8.
    Answer : False Variablesneed not be declared or defined in advance in Python. To create a variable, you just assign it a value.
  • 13.
    Q. Which ofthe following statements assigns the value 100 to the variable x in Python: A. x << 100 B. x ← 100 C. x = 100 D. x := 100
  • 14.