├── README.md ├── get-quote.py └── quotes.txt /README.md: -------------------------------------------------------------------------------- 1 | # Let's Write a Python Quote Bot! 2 | 3 | This repository will get you started with building a quote bot in Python. It's meant to be used along with the [Learning Lab](https://lab.github.com) intro to Python. 4 | 5 | When complete, you'll be able to grab random quotes from the command line, like this: 6 | 7 | > **$** python get-quote.py 8 | > 9 | > Keep it logically awesome 10 | > 11 | > **$** python get-quote.py 12 | > 13 | > Speak like a human 14 | 15 | ## Start the Tutorial 16 | 17 | You can find your next step in [this repo's issues](../../issues/)! 18 | -------------------------------------------------------------------------------- /get-quote.py: -------------------------------------------------------------------------------- 1 | import random 2 | def main(): 3 | #print("Keep it logically awesome.") 4 | 5 | f = open("quotes.txt") 6 | quotes = f.readlines() 7 | f.close() 8 | last = 13 9 | rnd = random.randint(0, last) 10 | print(quotes[rnd]) 11 | 12 | if __name__== "__main__": 13 | main() 14 | -------------------------------------------------------------------------------- /quotes.txt: -------------------------------------------------------------------------------- 1 | Responsive is better than fast 2 | It’s not fully shipped until it’s fast 3 | Anything added dilutes everything else 4 | Practicality beats purity 5 | Approachable is better than simple 6 | Mind your words, they are important 7 | Speak like a human 8 | Half measures are as bad as nothing at all 9 | Encourage flow 10 | Non-blocking is better than blocking 11 | Favor focus over features 12 | Avoid administrative distraction 13 | Design for failure 14 | Keep it logically awesome 15 | --------------------------------------------------------------------------------