def post(st): n = random.randint(0, 2) if st is 0: t = tags1(n) rt = str((wikiquotes.quote_of_the_day("english")[0])) #print(rt+t) return (rt + t) else: t = tags2(n) cn = ChuckNorris() data = str(cn.random()) while len(data) > 270: data = cn.random() #print(data+t) return (data + t)
# -*- coding: utf-8 -*- import string import random from chuck import ChuckNorris jokes = ChuckNorris() def fiveLines(): print "\n" * 4 def cleanScreen(): print "\n" * 24 def deleteLowercase(p): return string.upper(p) def isRightLetter(c): if c in "abcdefghijqlmnñopqrstuvwxyz": if c not in "aeiou": return True else: return False else: return False def countWords(p):
#gia na treksei to programma prepei na ektelestei sto cmd #h entolh "python -m pip install chuck-norris-python" from chuck import ChuckNorris cn = ChuckNorris() data = cn.random() print(data.joke) joke = data.joke spl = joke.split() for word in spl: if (len(word) > 2): print((ord(word[0]) + ord(word[-1])) % 3) else: print(-1)
def setUp(self): self.cn = ChuckNorris()