Created
November 30, 2021 11:58
-
-
Save ryan-blunden/34102ae67867458082e9ae105e4012f9 to your computer and use it in GitHub Desktop.
Pybites commuity intro message fun
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
from dataclasses import dataclass | |
import random | |
pybites_init_questions = [ | |
'If you were to build a chatbot what would it do' | |
] | |
@dataclass | |
class PybitesIntro: | |
name: str | |
use_python_for: str | |
day_job: float | |
random_question: str | |
random_answer: str | |
def __str__(self) -> str: | |
return '\n'.join([ | |
'\nHere is your response to paste into the Pybites community Slack\n\n', | |
f'Hi! I\'m {self.name}!', | |
f'I use Python for {self.use_python_for}.', | |
f'My day job is {self.day_job}.', | |
f'To the question "{self.random_question}"?', | |
f'My answer would be: "{self.random_answer}".', | |
'\n\nNice to meet you all!\n' | |
]) | |
random_question = random.choice(pybites_init_questions) | |
print( | |
PybitesIntro( | |
name=input('\nHi Friend!\n\nWhat is your name: '), | |
use_python_for=input('What do you use Python for: '), | |
day_job=input('What is your day job: '), | |
random_question=random_question, | |
random_answer=input(f'{random_question}: ') | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Haha nice, maybe this could be a PR on https://github.com/PyBites-Open-Source/karmabot ?