Created
September 11, 2017 13:53
-
-
Save anonymous/93fe22d771a2254bb6a685cdf7737306 to your computer and use it in GitHub Desktop.
This file contains 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
------main.py------------ | |
elif choice == "14": | |
marvin.points_grade() | |
else: | |
choice_low = choice.lower() | |
choice_list = choice_low.split() | |
for line in choice_list: | |
if not 'citat' in line: | |
continue | |
marvin.quote() | |
-------marvin.py----------- | |
def quote(): | |
""" | |
citat | |
""" | |
filename = "quotes.txt" | |
with open(filename) as filehandle: | |
line = filehandle.read() | |
quote_split = line.split("\n") | |
print(quote_split[random.randint(0, len(quote)-1)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment