-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1st.py
37 lines (29 loc) · 829 Bytes
/
1st.py
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
# Q1. Write a Program to Demonstrate Different Data Types.
# Integer
a = 10
print("The value of a is:", a)
print("The data type of a is:", type(a))
# Floating point number
b = 3.14159
print("The value of b is:", b)
print("The data type of b is:", type(b))
# String
c = "Hello, world!"
print("The value of c is:", c)
print("The data type of c is:", type(c))
# Boolean
d = True
print("The value of d is:", d)
print("The data type of d is:", type(d))
# List
e = [1, 2, 3, 4, 5]
print("The value of e is:", e)
print("The data type of e is:", type(e))
# Tuple
f = (1, 2, 3, 4, 5)
print("The value of f is:", f)
print("The data type of f is:", type(f))
# Dictionary
g = {"name": "John", "age": 30, "city": "New York"}
print("The value of g is:", g)
print("The data type of g is:", type(g))