-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtype-conversion.py
More file actions
58 lines (44 loc) · 887 Bytes
/
type-conversion.py
File metadata and controls
58 lines (44 loc) · 887 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
51
52
53
54
55
56
57
58
# x = input("1. sayı: ")
# y = input("2. say: ")
# print(type(x))
# print(type(y))
# toplam = int(x)+int(y)
# print(toplam)
#hepsini yorun satırı yapmak için hepsini seçip Ctrl + k + c yap
x = 5#int
y = 2.5#float
name = "Yekta"#string
isonline = True#bool
# print(type(x))
# print(type(y))
# print(type(name))
# print(type(isonline))
# Type Conversion
# int to float
# x = float(x)
# print(x)
# print(type(x))
# y = int(y)
# print(y)
# print(type(y))
# y = float(y)
# print(y)
# print(type(y)),
# result = x + y
# print(result)
# print(type(result))
# result = str(x) + str(y)
# print(result)
# print(type(result))
# bool to string
# isonline = str (isonline)
# print(isonline)
# print(type(isonline))
# bool to int
# isonline = int (isonline)
# print(isonline)
# print(type(isonline))
isonline = False
isonline = int (isonline)
print(isonline)
print(type(isonline))