class Person:
def __init__(self, name, field_of_study, current_focus, interesting_fact, hobbies):
self.name = name
self.field_of_study = field_of_study
self.current_focus = current_focus
self.interesting_fact = interesting_fact
self.hobbies = hobbies
def get_location(self):
return "Unknown City"
def aspirations(self):
return ["Explore New Technologies", "Complete Personal Projects"]
def __str__(self):
return f"{self.name}, a {self.field_of_study} enthusiast, currently focusing on {self.current_focus}. " \
f"Interesting fact: {self.interesting_fact}. Hobbies include: {', '.join(self.hobbies)}."
# Create an instance of Person with abstracted details
user = Person(
name="K___ Nick",
field_of_study="Computer Science and Information Technology",
current_focus="DevOps",
interesting_fact="I have strong feelings about certain numbers.",
hobbies=['Music', 'Chilling', 'Gaming', 'Horror Movies']
)
# Demonstrate usage
print(user)
print("Current Location:", user.get_location())
print("Aspirations:", user.aspirations())
-
Notifications
You must be signed in to change notification settings - Fork 0
devonixx/devonixx
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
page
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published