Ask Question
14 June, 19:09

Which Python variable names are invalid?

a) 12MonthsTotal_Pay

b) TotalPay$

c) Total_January2019

d) JanuaryRateln%

+2
Answers (2)
  1. 14 June, 19:34
    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.
  2. 14 June, 20:28
    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
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Which Python variable names are invalid? a) 12MonthsTotal_Pay b) TotalPay$ c) Total_January2019 d) JanuaryRateln% ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers