Silly Sentences using Python

This fun code example creates Silly Sentences using Python


This is a great code to adapt to entertain your friends while learning important aspects of Programming such as Random and Arrays.

*Featured Code Created By Christine



Python


# This code prints three silly sentences. Enjoy!
#Enter your name into the input


name = input()

import random

part1 = ["A cow", "Ron Weasley", "Peter Pan", "A Teddy bear", "Your computer", "Elmo", "A goblin", "Sherlock Holmes", "Superman", "Your worst enemy", "Your best friend", "Frankenstien", "A person", "A flower", "A pillow"]

part2 = ["kicked", "was kicked by", "ate", "was eaten by", "painted", "bumped into", "was saved from", "had a great adventure with", "played a game of chess with", "played charades with", "got a text from", "fell in love with"]

part3 = ["Rip Van Winkle", "a python", "a programmer", "a duck", "a unicorn", "the Sun", "The Doctor", "Pikachu", "a shoe", "gibberish"]

print("Your three random silly sentences are:")
print(part1[random.randint(0,14)], part2[random.randint(0, 11)], part3[random.randint(0,9)])
print(part1[random.randint(0,14)], part2[random.randint(0, 11)], part3[random.randint(0,9)])
print(part1[random.randint(0,14)], part2[random.randint(0, 11)], part3[random.randint(0,9)])

print("\nThanks for checking out my first public code,", name, "!")
print()
print("Make sure to share all your silliest sentences in the comments!\nIf people seem to like this code, I will make it more complex.")


Click here to run this fun Code






Comments

Popular posts from this blog