Last active
July 17, 2023 22:30
-
-
Save NitkarshChourasia/6cf00371a73c43135434f3e82e42e9cc to your computer and use it in GitHub Desktop.
A brief introduction about me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person: | |
def __init__(self, name, bio, website, social_media): | |
self.name = name | |
self.bio = bio | |
self.website = website | |
self.social_media = social_media | |
def display_intro(self): | |
print(f"Name: {self.name}") | |
print(f"Bio: {self.bio}") | |
print(f"Website: {self.website}") | |
print("Social Media:") | |
for platform, link in self.social_media.items(): | |
print(f"{platform.capitalize()}: {link}") | |
class CoolIntroduction: | |
def __init__(self, person): | |
self.person = person | |
def display(self): | |
print("Welcome to a Cool Introduction!") | |
print("Here's some information about the person:") | |
self.person.display_intro() | |
print("Thank you for checking out this cool introduction!") | |
nitkarsh_chourasia = Person( | |
name="Nitkarsh Chourasia", | |
bio="Trying to be a pragmatic programmer.", | |
website="https://nitkarshchourasia.github.io/", | |
social_media={ | |
'twitter': "https://twitter.com/NitkarshC", | |
'linkedin': "https://www.linkedin.com/in/nitkarsh-chourasia-a32a21218/", | |
'instagram': "https://www.instagram.com/nitkarsh.chourasia/", | |
'github': "https://github.com/NitkarshChourasia", | |
'gmail': "[email protected]" | |
} | |
) | |
cool_intro = CoolIntroduction(nitkarsh_chourasia) | |
cool_intro.display() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Made with love ❤️
Using python programming language best practices and also following OOPs approach.