Q. Out of the following, find those identifiers, which cannot be used for naming Variables or Functions in a Python program:


price*Qty, class, For, do,
4thCol, totally, Row31, _Amount  


Answer =

price*Qty , class , 4thCol .

9 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. also "For" cannot be used

    ReplyDelete
    Replies
    1. You are wrong, F is in capital letter in "For". So we can use it as identifiers.

      Delete
  2. also"_Amount" cannot be used

    ReplyDelete
    Replies
    1. It can be used as underscore is valid in writing identifiers

      Delete
  3. Why is row31 not categorised as invalid ? It does contain digits which i believe is not valid for writing identifiers

    ReplyDelete
    Replies
    1. You are wrong, Please practice it in your IDLE Python.

      Delete
    2. digits cannot be present only at the begining. Rest elsewhere digits, underscores and alphabets are used.

      Delete
  4. How come class cannot be used for naming variables??

    ReplyDelete
  5. Because class is a keyword

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post