class WhoAmI:
def __init__(self, name, location, role, languages_spoken):
self.name = name
self.location = location
self.role = role
self.languages_spoken = languages_spoken
def introduce(self):
languages = ", ".join(self.languages_spoken)
return (
f"Hi, my name is {self.name}. I live in {self.location} "
f"and my role is {self.role}. I speak {languages}."
)
if __name__ == "__main__":
person = WhoAmI("Piotr Szyk", "London", "Software Engineer",
["English", "Polish"])
print(person.introduce())
I am learning Data Science and Machine Learning at HyperionDev Bootcamp.
Please see my profile at: https://www.hyperiondev.com/portfolio/132088/
100 Days of Code, The Complete Python Pro Bootcamp for 2023
https://github.com/piotr-szyk/100-Days-of-Code-The-Complete-Python-Pro-Bootcamp-for-2023