Skip to content

Commit 0e4d82c

Browse files
authored
Create type_test.py
1 parent 90ee645 commit 0e4d82c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

exercise/type_test.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from decimal import Decimal
2+
3+
i = 26
4+
print(i, type(i))
5+
6+
a = 3.14159
7+
print(a, type(a))
8+
9+
print(1.1 + 2.2)
10+
print(1.1 + 2.1)
11+
print(Decimal('1.1') + Decimal('2.2'))
12+
13+
f1 = True
14+
f2 = False
15+
print(f1, type(f1))
16+
print(f2, type(f2))
17+
print(f1+1)
18+
print(f2+1)
19+
20+
str1 = '人生苦短,我用Python'
21+
str2 = "人生苦短,我用python"
22+
str3 = """
23+
人生苦短,我用python
24+
"""

0 commit comments

Comments
 (0)