0% found this document useful (0 votes)
4 views

Python Class 01

The document covers fundamental concepts in programming, including web development, data science, automation, and AI. It provides examples of conditional statements, variable naming conventions, data types, and type conversion in programming. Additionally, it outlines operators for arithmetic, comparison, and logical operations, along with basic input/output operations.

Uploaded by

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

Python Class 01

The document covers fundamental concepts in programming, including web development, data science, automation, and AI. It provides examples of conditional statements, variable naming conventions, data types, and type conversion in programming. Additionally, it outlines operators for arithmetic, comparison, and logical operations, along with basic input/output operations.

Uploaded by

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

Web-development

Data science
Automation
AI

if(5>2)
{
printf(“5 is greater than 2”)
}

If 5 >2 :
print(“ 5 is greater than 2”)

Variable:
Start with a letter
No symbol can be used.
Cannot start with a number.
Can use _ .
Case -sensitive.
Areeb areeb

Data types:
Name = “areeb”

“ “ === string
10 === int
110.58=== float
True\false == bool
Name = “Areeb“ // string
Age = 22 //int
Height = 5.3 //float
Male = True //bool
Female = False //bool
Reg = “210”

Reg = “10”
Registration = int(Reg) // string to int
print(Registration) \\ 10

Reg = 10
Registration = str(Reg) // int into string
print(Registration) // ”10”

Operators & I/O


Arithmetic operator: +- * / %
Comparison: == , != , <, > , >= , <=
Logical: and , or , not

Sum = a+ b
mul= a*b
div= a\b

If sum <= mul:

name= input(“Enter your name:”)


print(“Hello”, name)

You might also like