0% found this document useful (0 votes)
3 views2 pages

Python Fundamental

The document outlines various applications of Python, including web development, machine learning, data analysis, and game development. It also explains the concept of tokens in Python, detailing keywords, identifiers, literals, and operators, along with rules for naming identifiers. Additionally, it provides examples of valid and invalid identifiers and discusses the declaration of variables and assignment of values.

Uploaded by

mukul tomar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Python Fundamental

The document outlines various applications of Python, including web development, machine learning, data analysis, and game development. It also explains the concept of tokens in Python, detailing keywords, identifiers, literals, and operators, along with rules for naming identifiers. Additionally, it provides examples of valid and invalid identifiers and discusses the declaration of variables and assignment of values.

Uploaded by

mukul tomar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

APPLICATIONS OF PYTHON

1. Web development: They help you write server-side code.

2. Machine learning: There are many machine learning applications in Python. Machine
learning is a way to write a logic so that a machine can learn and solve a particular problem on
its own. For example, product recommendations in websites, like Amazon, Flipkart, eBay, etc.,
3. Data analysis: Python has a unique attribute and is easy-to-use when it comes to
quantitative and analytical computing.
4. Game development: Python is also suitable for building tools for game designers that
simplify tasks, such as "level designing" or "dialogue tree creation", etc.

TOKENS
Token is the smallest unit inside a program. Tokens can be defined as a punctuation mark,
reserved words or each individual word in a statement.

There are various tokens in Python:


●​ Keywords or reserved words
●​ Identifiers
●​ Literals
●​ Operators

1.Keywords/Reserved Words
Keywords are a set of special words which are reserved by Python and have specific meanings.
Keywords in Python are case sensitive. Note that we are not allowed to use keywords as
variables in Python.

2. Identifiers or Variables
Variable, also known as identifier, is used to hold a value. Variable is a name which is used to
refer memory location.

Rules for Naming an Identifier


The rules to name an identifier are given below:
→ The first character of the variable must be a letter or an underscore (_).
→ All the characters except the first character may be a letter of lower case (a-z), upper case
(A-Z), an underscore or a digit (0-9).
→ Identifier name must not contain any white space, or special character (!, @, #,%, ^, &, *).
→ Identifier name must not be similar to any keyword defined in the language.
→ Identifier names are case sensitive. For example, my name and MyName are not the same.
→ Examples of valid identifiers: a l23, _n, n_9, etc.
→ Examples of invalid identifiers: la, n%4, n 9, etc.
Declaring Variables and Assigning Values
d=10
b=‘Aryan’

3. Literals
Literals can be defined as data that is given in a variable or constant.

4. Operators:
Operators are symbols which perform an operation on some values. These values are known as
operands.
In Python, operators are categorised into the following categories:
→ Arithmetic Operators
→ Comparison Operators
→ Assignment Operators

You might also like