Computer Science, asked by ramsmedicine, 2 months ago

Fix the variables names mentioned below:

marks!=100


007age=14


class sec="8O"


Correct the variable names and print them below.

Answers

Answered by allysia
0

Answer:

marks=100

age007= 14

class_sec="80"

Explanation:

To know why i named them the way i did consider the following rules:

  • A varaible or identifiers as we prefer to call them must not have a special character in them. Marks! has "!" remove it. You can use undescore tho. Marks_
  • An identifier must not start with a number 007age is a wrong name and you can name it _007age, or a007ge just make sure any number doesnt starts the word.
  • An identifier must not have any space within its name like the 3rd one has. We usually replace it with "_" (underscore) or skip it like in classsec.
  • An identifier must not have a keywords name. There are some keywords in python like True, False, Class, def etc make sure your identifier doesn't has any of these names.
Similar questions