Check out My Portfolio Chatbot🤓
# Define a class named Elvis
class Elvis():
# Initialize the instance variables
def __init__(self):
self.name = "Kipkemoi Elvis"; # Set the name to "Kipkemoi Elvis"
self.username = "DynastyElvis"; # Set the username to "DynastyElvis"
self.location = "Nairobi, Kenya"; # Set the location to "Nairobi, Kenya"
self.twitter = "@Dynastyelvis"; # Set the twitter handle to "@Dynastyelvis"
self.web = "https://g.dev/dynastyelvis"; # Set the website URL to "https://g.dev/dynastyelvis"
# Define a string representation of the object
def __str__(self):
return self.name # Return the name when the object is converted to a string
# Create an instance of the Elvis class if the script is run as the main program
if __name__ == '__main__':
me = Elvis() # Create a new instance of the Elvis class and assign it to the variable "me"