Skip to content

Commit 045f0f6

Browse files
authored
Create types_bahri_un.py
I have read the [CONTRIBUTING] ✓ I have performed self-review on my own code ✓ I have run the code locally and it works as expected ✓ I have commented my code ✓
1 parent 59cfadb commit 045f0f6

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Week02/types_bahri_un.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
my_int= 10
2+
my_var = 123
3+
4+
a =float(5784.2369)
5+
my_float =2403.5940
6+
my_float2=2158546548.43
7+
8+
my_bool= True
9+
my_complex= 87+3j
10+
11+
print("There are integers:")
12+
print("my_int:",my_int,", type:", type(my_int))
13+
print("my_var:",my_var, ", type:", type(my_var))
14+
15+
print("There are floats:")
16+
print("a:",a,"type:", type(a))
17+
print("my_float:",my_float, ", type:", type(my_float))
18+
print("my_float2:",my_float2, ", type:", type(my_float2))
19+
print(float(3)) #To make sure prints as a decimal number.
20+
21+
print("There are boolean and complex:")
22+
print(my_bool,", type:", type(my_bool))
23+
print(my_complex, ", type:", type(my_complex))
24+
25+
#We can understand variable types with "type()".

0 commit comments

Comments
 (0)