Python Fundamentals

So until now, we have seen the python installation in our systems. Now let us start coding with python fundamentals.

Statements:

Python statements are nothing, but the logical instructions that the interpreter execute. Hence the statements can be in single line (or) multi line statements.

Python statements were categorized into two statements :

python fundamentals

Expression statement and Assignment statements.

Expression statements :

The expression statements include several  operator expressions like Addition(+), Subtraction(-) , multiplication (*), division(/) and modulo(%). Probably In other words, the expression statement returns a value.

An expression is something that returns a value.

Arithmetic expressions:

(10/2)*3

15

Functional expression:

Every Interpreter/compiler have some predefined function like pow(), sqrt() and so on. And Python interpreter supports this tool.

Pow(2.3)

8

Sqrt(81)

3

Assignments statements :

These type of statements creates a variable and assigns a value to it. Hence the assignment statements logically operate and stores the results in the variable(it operates on LHS and stores on RHS).

Examples:

Test1 =’I love coding’

Id (test1)

Output: 70809568

Test2=’I love coding’

Id(test2)

Output:  70809568

If you seriously noticed the above two variables, namely test1 and test2, therefore the interpreter allocates same memory allocation for both the variables.

Want to become a master in Python visit python online training

Note :

Almost Python allocates same memory location in two cases

If the string is less than 20 characters ( white spaces were included)

Integers ranging between -5 to + 255.

RHS operations :

In this, we have some operations on RHS. Hence, Let us discuss with some examples.

Test =7*2

type(test)

Output : input

Test = 7*2/10

type(test)

Output: float

Comments :

So, these are nothing but the non – executable line of code. While, we have two types of comments.

Single line comments:  

The single line comments start with #

# I don’t execute

Multiple line comments :

Finally, the multiple line comments start and end with “  ”.

Drop Us A Query

Trending Courses
  • Cyber Security Training
  • Days were moving very quickly. With days, technology is moving simultaneously. Today technology has bot the advantages and disadvantages. Moreover, today data is the heart of any company.

  • Blockchain Online Course
  • Today many people were enthusiastic, to know the exact details of things happening around him. This can get the proper knowledge on Blockchain.

  • Python Online Training
  • Python is a dynamic interrupted language which is used in wide varieties of applications. It is very interactive object oriented and high-level programming language.

  • Tableau Training
  • Tableau is a Software company that caters interactive data visualization products that provide Business Intelligence services. The company’s Head Quarters is in Seattle, USA.

  • PEGA 7.4 Certification Training
  • Pega Systems Inc. is a Cambridge, Massachusetts based Software Company. It is known for developing software for Customer Relationship Management (CRM) and Business process Management (BPM).

  • Workday Training
  • Workday specializes providing Human Capital Management, Financial Management and payroll in online domain.It is a major web based ERP software vendor.


100% Secure Payments. All major credit & debit cards accepted.