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

Python Notes: Invented By: Guido Van Rossum (1991)

This Python document provides an overview of the language, including that it was invented by Guido Van Rossum in 1991, supports branching, looping, and modular programming, and can be used for data analysis and statistics. It also demonstrates different data types in Python like integers and floats, and shows examples of operations like addition, subtraction, multiplication, division, and more. Comments in Python can be single line with # or multi-line within """ """.

Uploaded by

Esha Dongre
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
109 views2 pages

Python Notes: Invented By: Guido Van Rossum (1991)

This Python document provides an overview of the language, including that it was invented by Guido Van Rossum in 1991, supports branching, looping, and modular programming, and can be used for data analysis and statistics. It also demonstrates different data types in Python like integers and floats, and shows examples of operations like addition, subtraction, multiplication, division, and more. Comments in Python can be single line with # or multi-line within """ """.

Uploaded by

Esha Dongre
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 2

PYTHON NOTES

Only for reference, Do not copy paste.

Invented by: Guido Van Rossum (1991)

Python allows branching (part), looping (repeating) as well as modular programming.

Store: Character- 4 bites and Integer- 2 bites.

Using python we can do data analysis & statistical functions.

Program: takes INPUT gives OUTPUT

Note: For adding comment in python:

 Single line comment: #


 Multiple line comment: “”” “””

Program Integer:- when both numbers are integer (eg: 2,3)


x=int(input(“enter number”))

print(“the number is”,x, “and class is”,type(x))

Program Float:- when both numbers are decimal (eg: 2.9,3.5)


x=float(input(“enter number”))

print(“the number is”,x, “and class is”,type(x))

Program Eval:- when both numbers are unknown, can be decimal or integer (eg: 2.9,3.5)
x=eval(input(“enter number”))

print(“the number is”,x, “and class is”,type(x))

OPERATIONS IN PYTHON:

+ addition 6+2=8
- subtraction 6-2=4
* multiplication 6*2=12
/ division 6/2=3.0
% modulo (reminder of division) 6%2=0
// It gives int division 6//2=3
** Exponential 6**2=36
ADDITION:
num1=eval(input(“enter first number”))

num2=eval(input(“enter second number”))

ans=num1+num2

print(“the addition of two number is”,ans)

OR

You might also like