Ask Question
6 February, 03:33

Which Python variable names are invalid?

a) 12MonthsTotal_Pay

b) TotalPay$

c) Total_January2019

d) JanuaryRateln%

+4
Answers (2)
  1. 6 February, 03:47
    0
    (A) 12MonthsTotal_Pay (B) TotalPay$ and (D) JanuaryRateIn%

    Explanation:

    B and D feature symbols and signs, which aren't allowed in variable names of python. Variables cannot start with numbers, either, so A is invalid. C is the only right answer
  2. 6 February, 07:14
    0
    In the following question, Option (a), Option (b), and Option (d) is correct because in Python programming language we not defined variable in these types.

    Explanation:

    a). 12MonthsTotal_Pay = 5

    output:

    SyntaxError: invalid syntax

    Because variable is not start with numbers.

    b). TotalPay$ = 7

    output:

    SyntaxError: invalid syntax

    Because the variable is not supported any symbol.

    d). JanuaryRateln% = 12

    output:

    SyntaxError: invalid syntax

    Because the variable is not supported any sign and symbol.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which Python variable names are invalid? a) 12MonthsTotal_Pay b) TotalPay$ c) Total_January2019 d) JanuaryRateln% ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers