Ask Question
28 June, 02:21

Which Python variable names are invalid?

a) 12MonthsTotal_Pay

b) TotalPay$

c) Total_January2019

d) JanuaryRateln%

+4
Answers (2)
  1. 28 June, 02:32
    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. 28 June, 02:48
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers