-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.py
More file actions
46 lines (38 loc) · 805 Bytes
/
variables.py
File metadata and controls
46 lines (38 loc) · 805 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
"""
variables.py
Demonstrates different types of variables in Python with clear examples.
"""
# String
name = "Subham Bhattacharya"
# Integer
age = 22
# Float
height_cm = 173.5
# Boolean
is_learning_python = True
# List (mutable collection)
skills = [
"Python",
"HTML",
"Git",
"AI Basics",
"Prompt Engineering",
"Automation with Python",
"Problem Solving"
]
# Dictionary (key-value data)
profile = {
"name": name,
"age": age,
"skills": skills,
"active_learner": is_learning_python
}
# Printing values in a clean way
print("----- User Profile -----")
print(f"Name: {name}")
print(f"Age: {age}")
print(f"Height: {height_cm} cm")
print(f"Learning Python: {is_learning_python}")
print(f"Skills: {skills}")
print("\nFull Profile Dictionary:")
print(profile)