-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic.py
More file actions
49 lines (36 loc) · 652 Bytes
/
basic.py
File metadata and controls
49 lines (36 loc) · 652 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
a = 201
b = 101_545_458_444
print (a , b)
a= 9.75
b = 15.0
types = type(a)
print(types)
print (a,b)
s1 = bin(10)
s2 = oct(10)
s3 = hex(10)
print(s1, s2, s3)
s1 = bin(True)
print (s1)
f = 16.59
b =True
s1 = "555"
s2 = '0b1010'
s3 = '0xA'
x = int (f)
x1 = int(b)
x2 = int(s1)
x3 = int(s2, 2)
x4 = int(s3, 16)
print(x, x1, x2, x3, x4)
types = type(x), type(x1), type(x2), type(x3), type(x4)
print(types)
int("125") == 125
length = 15
breadth = 5
area = (length*breadth)
print("Area of the rectangle is:" , area)
x = int(input('Enter your length: '))
y = int(input('Enter your breadth: '))
area = x*y
print('Area of the rectangle is: ', area)