-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathday4.py
More file actions
50 lines (48 loc) · 938 Bytes
/
day4.py
File metadata and controls
50 lines (48 loc) · 938 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
x=1 # int
y= 2.5 # float
z=1j # complex
print(type (x))
print(type (y))
print(type (z))
#***************************************
x=1
y= 2333434
z= 2222334565456765
print(type (x))
print(type (y))
print(type (z))
#***************************************
x=1.5 ;y=1.0 ;z=-35.59
print(type (x))
print(type (y))
print(type (z))
#************************************
x= 35e3 ;y=12E4 ;z=-87.7e100
print(type (x))
print(type (y))
print(type (z))
#*************************************
x=3+5j;y=5j;z=-5j
print(type (x))
print(type (y))
print(type (z))
#***************************************
x=1 #int
y= 2.8 #float
x=1j # complex
# convert from int to float:
a=float(x)
#convert from float to int :
b=int(y)
# convert from x to complex:
c=complex(x)
print(a)
print(b)
print(c)
print(type (a))
print(type (b))
print(type (c))
#***************************
import random
print(random.randrange(1,10))
#*****************************************