Which variables below are incorrectly defined? (Select four options), __year = [24, 53, 65, 12] 2020_year = [24, 53, 65, 12] def = "This is new string" _year = [24, 53, 65, 12]

Questions & AnswersCategory: PythonWhich variables below are incorrectly defined? (Select four options), __year = [24, 53, 65, 12] 2020_year = [24, 53, 65, 12] def = "This is new string" _year = [24, 53, 65, 12]
Geek Boy Staff asked 2 years ago

Which variables below are incorrectly defined? (Select four options)
a. __year = [24, 53, 65, 12]
b. 2020_year = [24, 53, 65, 12]
c. def = ‘This is a short definition of sth.’
d. _year = [24, 53, 65, 12]
e. var1 = 100
f. if = 30
g. class = ‘English Course’

1 Answers
Lokesh Kumar Staff answered 2 years ago

b. 2020_year = [24, 53, 65, 12]
c. def = ‘This is a short definition of sth.’
f. if = 30
g. class = ‘English Course’
Explanation

The variable name cannot start with a digit.

ifclassdef – these are keywords in Python and cannot be used as variable names.