-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypes of token.py
More file actions
29 lines (23 loc) · 865 Bytes
/
Copy pathTypes of token.py
File metadata and controls
29 lines (23 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#Punctuators :- Symbols used for the organisation of code
#it is a typed language (Inplicit not explicit){ do not need to write int, float, etc}
A,B= 2,5
txt = '$'
print(2*txt*5)
#concatination = ading to strings
a,b='Cat', 'noir!'
print(a+b)
#numbers can be operated normally!
#Application of bodmas automatically takes place
print(2*3/2+6-4)
#result of two integers is always float
print(5/1)
#integer division {//} with float and int will give integer output in float form but an integer and integer will giveinteger
print(1.5//2, 1//2, 1/2)
#floor give closest integer before hand that number i.e. floor(5/2)=2
print(5//2)
#remainder is negative if denominator is negative
print(5%-2 , -5 % -2)
#But
print(-5%2)
#multiple line comment is specified by '''_ '''
#identifier (name of variable or function )should always start with either alphabets or _