45b6cc3b98cc72068ccc0ae0a1564b9adb888f07,random-sentences.py,,random_sentence,#,19

Before Change


    Creates random and return sentences.

    sentence = ""
    sentence += article[random.randint(0, 4)] + " " + noun[random.randint(
        0, 4)] + " "
    sentence += verb[random.randint(0, 4)] + " " + preposition[random.randint(
        0, 4)] + " "
    sentence += article[random.randint(0, 4)] + " " + noun[random.randint(
        0, 4)] + ". "
    sentence = sentence[0].upper() + sentence[1:]

    return sentence

After Change


    Creates random and return sentences.
    return ("{} {} {} {} {} {}"
                .format(article[random_int()]
                        ,noun[random_int()]
                        ,verb[random_int()]
                        ,preposition[random_int()]
                        , article[random_int()]
                        ,noun[random_int()])).capitalize()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: geekcomputers/Python
Commit Name: 45b6cc3b98cc72068ccc0ae0a1564b9adb888f07
Time: 2017-10-23
Author: fares.bessrour@gmail.com
File Name: random-sentences.py
Class Name:
Method Name: random_sentence


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 6e45bc9291e6d06383da38ed3b2265d0d2cc8f5c
Time: 2020-04-27
Author: tmatsuo@google.com
File Name: iam/api-client/service_accounts_test.py
Class Name:
Method Name: test_service_accounts


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 442efa40a52831655aa025cd60a5c6bc064c6ca2
Time: 2020-04-08
Author: tmatsuo@google.com
File Name: iam/api-client/access_test.py
Class Name:
Method Name: test_member