image
image
image

Identifiers and Keywords

image

At this point, you have been wondering why you must use print and str in that manner without the freedom or knowledge of why the stated words have to be written in that manner. The words print and str constitute a special type of words that have to be written that way always.  Each programming language has a set of keywords. In most cases, some keywords are found across several programming languages. Keywords are case sensitive in python meaning that we have to type them in their lowercase form always. Keywords cannot be used to name a function (we will explain what it is later), name of a variable.

There are 33 keywords in Python, and all are in lowercase save for None, False, and True. They must always be written as they appear below:

image

––––––––

image

Point to Note

The print() and str are functions, but they are inbuilt/preloaded functions in Pythons. Functions are a set of rules and methods that act when invoked. For instance, the print function will display output when activated/invoked/called. At this point, you have not encountered all of the keywords, but you will meet them gradually. Take time to skim through, read and try to recall as many as you can.

Practice Exercise

Identify what is wrong with the following variable names (The practice exercise requires recalling what we have learned so far)

a.  for=1

b.  yield=3

c.  34ball

d.  m