-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdatatypes.py
More file actions
50 lines (45 loc) · 971 Bytes
/
Copy pathdatatypes.py
File metadata and controls
50 lines (45 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# **** INT DATATYPES**
# ________________|_______________
# | | | |
# Decimal Binary Octal HexaDecimal
# 1)Decimal form :- allows (0 to 9)
# 2) Binary form:- allows digits(0 and one)
# literal values should be prefixed with 0b Or 0B
# EXAMPLE:-
#a = Ob111
#v = OB123
#d= b111
#print(a +" "+v +" "+ d)
# 3)Octal form:- allows(0 to 7)
# literal values should be prefixed with 0o or 0X
# ex:- a=0o123
#4)Hexadecimal forms:-allows digits (0 to 9)(both lower case abd upper case)
# literal values should be prefixed with 0x or 0X
# ex:-a=OXFACE
#Lets check it out :-
a=10
b=0o10
c=0X10
d=0b10
print(a)
print()
print(b)
print()
print(c)
print()
print(d)
#python consists the following DATATYPES (inbuilt):-
# int
# Float
# complex
# Bool
# Str
# Bytes
# Bytearray
# Range
# List
# Tuple
# Set
# Fronzenset
# Dict
# None