4 - Input-Output, Keywords and Identifiers
4 - Input-Output, Keywords and Identifiers
• What is an Identifier
• Keywords
• Reading Input
• Taking multiple inputs from user
• Output Formatting
• Python end parameter
What is an Identifier?
• A Python identifier is a name used to identify a
variable, function, class, module, or other
object. An identifier starts with a letter A to Z or
a to z, or an underscore (_) followed by zero or
more letters, underscores and digits (0 to 9).
• Python does not allow punctuation characters
such as @, $, and % within identifiers. Python is
a case sensitive programming language. Thus,
Man and man are two different identifiers in
Python. It helps to differentiate one entity from
another.
What is an Identifier?
Example:
$ Python 3.8.5
>>> help()
help> keywords
Reading input in Python
Developers often have a need to interact with
users, either to get data or to provide some sort of
result. Most programs today use a dialog box as a
way of asking the user to provide some type of
input.
Reading input in Python
2
functions
input()
- Python
v3.x
raw_input()
- Python
v2.x
Reading input in Python
Example:
Output
Formatting