Python Basics
Operator a special character which acts between two operands
Different types of operator
1. Arithmatic operator
a. +, -, *, /, //, **, %
2. Relational operator
a. >, <, <=, >=, !=
3. Logical operator
a. And (both)
b. Or (either)
c. Not (reverse)
Variable It’s a location in the RAM(main memory which hold some data for our program
Identifier Which identifies a variable or Literals in a program
Literal The values are known as literal
Example: a = 10
In the above a is a variable, = is a operator, 10 is a literal
Keyword The Reserved word which is used for python’s internal usage we can not use as an
Identifier
Example : is, for, if, int, float, double, list, tuple, dictionary…..etc
Data Types:
1. Number
a. Int
b. Float
c. double
2. String
3. List
4. Tuple
5. Dictionary
WAP to find the biggest number among two integers
A = int(input(‘Enter the value for A’)
B = int(input(‘Enter the value for B’)
if A>B:
print(‘ A is big’)
else:
print (‘B is big’)
WAP to find the biggest number among three integers
a = int(input(‘Enter the value for a’)
b = int(input(‘Enter the value for b’)
c = int(input(‘Enter the value for c’)
If (a>b) and (a>c):
print(‘a is big’)
Elif (B>C):
print(‘b is big’)
Else
print(‘c is big’)
Predict the out put
2+3*3
Answer 11
Use BODMAS rule