1) Introduction to Python
1) Introduction to Python
By
Dr. Yogesh Rajput
Introduction to Python
• It is used for:
– Data Analysis
– Artificial Intelligence
• The rest of the name can contain letters, numbers, and underscores.
• Python reserved keywords (e.g., if, else, for, while, etc.) cannot be used
as variable names.
function. y = “Sham"
print(type(x))
print(type(y))
#This is a comment
print(“Welcome to SIU!")
#This is a comment
#written in
#more than just one line
print("Hello, World!")
– float
– complex
• To verify the type of any object in Python, use the type() function:
print(type(x))
print(type(y))
print(type(z))
print(type(x))
print(type(y))
print(type(z))
print(type(x))
print(type(y))
print(type(z))
print(type(x))
print(type(y))
print(type(z))
x = 3+5j
y = 5j
z = -5j
print(type(x))
print(type(y))
print(type(z))
Dr. Yogesh M. Rajput 45
Python Casting
print(25 + 2)
• Assignment operators
• Comparison operators
• Logical operators
• Identity operators