Пример #1
0
def random_sentence(sentence_len, words):
    '''
    Select a random set of words from words file and store in a data type
    Put the number of words requested together into a "sentence"
    Output sentence
    '''
    sentence = ""
    for _ in range(sentence_len):
        word = random_python_quote(words)
        sentence += word + " "
    return sentence
Пример #2
0
from python_quote import random_python_quote
ran_quote = random_python_quote()
print(ran_quote)




Пример #3
0
def import_quote():
    quotes = python_quote.random_python_quote()
    return quotes
import python_quote as quote

if __name__ == '__main__':
    quote = quote.random_python_quote()
    print(quote)
Пример #5
0
from python_quote import random_python_quote

print(random_python_quote())




Пример #6
0
import python_quote

quotes = python_quote.random_python_quote()
print(quotes)
# print(__name__)
Пример #7
0
import python_quote

print(python_quote.random_python_quote())
Пример #8
0
def random_sentence(sentence_len, words):
    sentence = ""
    for _ in range(sentence_len):
        word = random_python_quote(words)
        sentence += word + " "
    return sentence
Пример #9
0
from python_quote import random_python_quote
quotes = ["It's just a flesh wound.",
          "He's not the Messiah. He's a very naughty boy!", "THIS IS AN EX-PARROT!!"]
print(random_python_quote(quotes))
Пример #10
0
from python_quote import random_python_quote

if __name__ == '__main__':
    random_python_quote()
Пример #11
0
def import_quote():
    quote = python_quote.random_python_quote()
    print(quote)
Пример #12
0
def random_sentence(sentence_length, words):
    new_sentence = ""
    for _ in range(sentence_length):
        word = random_python_quote(quotes)
        new_sentence += word + " "
    return new_sentence
Пример #13
0
def random_python_quote():
    return random_python_quote()