├── README.md
├── madlibs.py
├── random_madlibs.py
└── sample_madlib
├── __pycache__
├── code.cpython-38.pyc
├── hp.cpython-38.pyc
├── hungergames.cpython-38.pyc
└── zombie.cpython-38.pyc
├── code.py
├── hp.py
├── hungergames.py
└── zombie.py
/README.md:
--------------------------------------------------------------------------------
1 | # madlibs_randomly_fun
2 | Mad Libs is a phrasal template word game which consists of one player prompting others for a list of words to substitute for blanks in a story before reading aloud. The game is frequently played as a party game or as a pastime.
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/madlibs.py:
--------------------------------------------------------------------------------
1 | """
2 | Very Beginner Python Project by Kylie Ying
3 | Madlibs using string concatenation
4 | YouTube Kylie Ying: https://www.youtube.com/ycubed
5 | Twitch KylieYing: https://www.twitch.tv/kylieying
6 | Twitter @kylieyying: https://twitter.com/kylieyying
7 | Instagram @kylieyying: https://www.instagram.com/kylieyying/
8 | Website: https://www.kylieying.com
9 | Github: https://www.github.com/kying18
10 | Programmer Beast Mode Spotify playlist: https://open.spotify.com/playlist/4Akns5EUb3gzmlXIdsJkPs?si=qGc4ubKRRYmPHAJAIrCxVQ
11 | """
12 | # # string concatenation (aka how to put strings together)
13 | # # suppose we want to create a string that says "subscribe to _____ "
14 | # youtuber = "Kylie Ying" # some string variable
15 |
16 | # # a few ways to do this
17 | # print("subscribe to " + youtuber)
18 | # print("subscribe to {}".format(youtuber))
19 | # print(f"subscribe to {youtuber}")
20 |
21 | adj = input("Adjective: ")
22 | verb1 = input("Verb: ")
23 | verb2 = input("Verb: ")
24 | famous_person = input("Famous person: ")
25 |
26 | madlib = f"Computer programming is so {adj}! It makes me so excited all the time because \
27 | I love to {verb1}. Stay hydrated and {verb2} like you are {famous_person}!"
28 |
29 | print(madlib)
--------------------------------------------------------------------------------
/random_madlibs.py:
--------------------------------------------------------------------------------
1 | from sample_madlib import hp, code, zombie, hungergames
2 | import random
3 |
4 | if __name__ == "__main__":
5 | m = random.choice([hp, code, zombie, hungergames])
6 | m.madlib()
--------------------------------------------------------------------------------
/sample_madlib/__pycache__/code.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akrish4/madlibs_randomly_fun/294d959977f8e834b462f17be40e95145d1ce2ba/sample_madlib/__pycache__/code.cpython-38.pyc
--------------------------------------------------------------------------------
/sample_madlib/__pycache__/hp.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akrish4/madlibs_randomly_fun/294d959977f8e834b462f17be40e95145d1ce2ba/sample_madlib/__pycache__/hp.cpython-38.pyc
--------------------------------------------------------------------------------
/sample_madlib/__pycache__/hungergames.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akrish4/madlibs_randomly_fun/294d959977f8e834b462f17be40e95145d1ce2ba/sample_madlib/__pycache__/hungergames.cpython-38.pyc
--------------------------------------------------------------------------------
/sample_madlib/__pycache__/zombie.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akrish4/madlibs_randomly_fun/294d959977f8e834b462f17be40e95145d1ce2ba/sample_madlib/__pycache__/zombie.cpython-38.pyc
--------------------------------------------------------------------------------
/sample_madlib/code.py:
--------------------------------------------------------------------------------
1 | def madlib():
2 | body_part = input("Body Part: ")
3 | verb = input("Verb: ")
4 | adj1 = input("Adjective: ")
5 | adj2 = input("Adjective: ")
6 | adj3 = input("Adjective: ")
7 | adj4 = input("Adjective: ")
8 | adj5 = input("Adjective: ")
9 | noun1 = input("Noun: ")
10 | noun2 = input("Noun: ")
11 | noun_plural_1 = input("Noun (plural): ")
12 | noun_plural_2 = input("Noun (plural): ")
13 |
14 | madlib = f"I love computer programming because it's {adj1}! The journey to becoming a \
15 | good programmer starts with hope in your mind and a dream in your {body_part}. Through blood, \
16 | sweat, and {noun_plural_1}, hopefully it never ends. Yes, once you learn to {verb}, it becomes \
17 | a part of your life identity and you can become a super {adj2} hacker. Knowledge of programming \
18 | lets you take control of your {noun1}. You can create your own personal {noun_plural_2}, anything \
19 | from developing {adj3} software to analyzing data and making predictions about the {noun2}. You can \
20 | maybe even recreate Jarvis and make him extra {adj4}. I hope you'll start your {adj5} journey by \
21 | coding with Kylie :)"
22 |
23 | print(madlib)
--------------------------------------------------------------------------------
/sample_madlib/hp.py:
--------------------------------------------------------------------------------
1 | def madlib():
2 | adj1 = input("Adjective: ")
3 | adj2 = input("Adjective: ")
4 | adj3 = input("Adjective: ")
5 | adj4 = input("Adjective: ")
6 | noun1 = input("Noun: ")
7 | noun2 = input("Noun: ")
8 | noun3 = input("Noun: ")
9 | noun4 = input("Noun: ")
10 | noun5 = input("Noun: ")
11 | noun6 = input("Noun: ")
12 | noun_plural = input("Noun plural: ")
13 | body_part = input("Body part: ")
14 | body_part2 = input("Body part: ")
15 | verb = input("Verb: ")
16 | verb_past = input("Verb (past tense): ")
17 | verb_past2 = input("Verb (past tense): ")
18 | spell1 = input("Spell: ")
19 | spell2 = input("Spell: ")
20 |
21 |
22 | madlib = f"A {adj1} glow burst suddenly across the enchanted sky above them as an edge of \
23 | dazzling sun appeared over the sill of the nearest {noun1}. The light hit both of their {body_part} \
24 | at the same time, so that Voldemort’s was suddenly a flaming {noun2}. Harry heard the high voice \
25 | shriek as he too {verb_past} his best hope to the heavens, pointing Draco’s {noun3}:\n\
26 | \"{spell1}!\"\n\
27 | \"{spell2}!\"\n\
28 | The bang was like a cannon blast, and the {adj2} flames that erupted between them, \
29 | at the dead center of the circle they had been treading, marked the point where the \
30 | {noun_plural} collided. Harry saw Voldemort’s {adj3} jet meet his own spell, saw the Elder Wand \
31 | fly high, dark against the sunrise, spinning across the enchanted ceiling like the \
32 | head of Nagini, spinning through the air toward the master it would not {verb}, who had \
33 | come to take full possession of it at last. And Harry, with the unerring skill of a Seeker, \
34 | caught the {noun4} in his free hand as Voldemort fell backward, arms splayed, the slit pupils \
35 | of the {adj4} {body_part2} rolling upward. Tom Riddle hit the floor with a mundane finality, his body \
36 | feeble and shrunken, the white hands empty, the snakelike face vacant and unknowing. Voldemort \
37 | was dead, {verb_past2} by his own rebounding {noun5}, and Harry stood with two wands in his hands, \
38 | staring down at his enemy’s {noun6}."
39 |
40 | print(madlib)
41 |
--------------------------------------------------------------------------------
/sample_madlib/hungergames.py:
--------------------------------------------------------------------------------
1 | def madlib():
2 | number = input("Number: ")
3 | adj = input("Adjective: ")
4 | verb = input("Verb: ")
5 | verb2 = input("Verb: ")
6 | noun = input("Noun: ")
7 | noun2 = input("Noun: ")
8 | noun3 = input("Noun: ")
9 | noun4 = input("Noun: ")
10 | noun5 = input("Noun: ")
11 | noun_plural = input("Noun (plural): ")
12 | noun_plural_2 = input("Noun (plural): ")
13 | noun_plural_3 = input("Noun (plural): ")
14 | sound_important = input("Name of something that sounds important: ")
15 |
16 |
17 | madlib=f"{number} seconds. That’s how long we’re required to {verb} on our metal circles before \
18 | the sound of a {noun} releases us. Step off before the {number} seconds is up, and {noun_plural} blow your \
19 | legs off. {number} seconds to take in the ring of tributes all equidistant from the {sound_important}, a giant \
20 | {adj} {noun2} shaped like a {noun3} with a curved tail, the mouth of which is at least twenty feet \
21 | high, spilling over with the things that will give us life here in the arena. Food, containers of water, \
22 | {noun_plural_2}, medicine, garments, {noun_plural_3}. Strewn around the {sound_important} are other supplies, their value \
23 | decreasing the farther they are from the {noun2}. For instance, only a few steps from my feet lies a three-foot \
24 | square of {noun4}. Certainly it could be of some use in a downpour. But there in the mouth, I can see a {noun5} \
25 | that would protect from almost any sort of weather. If I had the guts to go in and {verb2} for it against \
26 | the other twenty-three tributes. Which I have been instructed not to do."
27 |
28 | print(madlib)
29 |
30 | if __name__ == '__main__':
31 | madlib()
32 |
--------------------------------------------------------------------------------
/sample_madlib/zombie.py:
--------------------------------------------------------------------------------
1 | def madlib():
2 | time_of_day = input("Time of Day: ")
3 | body_part_plural = input("Body Part (plural): ")
4 | color = input("Color: ")
5 | verb_past_tense = input("Verb (past tense): ")
6 | food = input("Food: ")
7 | noun1 = input("Noun: ")
8 | noun_plural_1 = input("Noun (plural): ")
9 | adj1 = input("Adjective: ")
10 | adj2 = input("Adjective: ")
11 | adj3 = input("Adjective: ")
12 |
13 |
14 | madlib = f"It was a {adj1} summer {time_of_day} when we realized that the vaccine to stop \
15 | spread of the disease did not work. Instead, it produced ZOMBIES!!! They were thirsty for {body_part_plural} \
16 | and the streets were lined with these monsters holding {noun_plural_1} in their hands. \
17 | Their eyes were {color} with hunger as they {verb_past_tense} around the city looking for {food}. \
18 | They were {adj2} and {adj3}, unknowing how to act in this human world... except eat {body_part_plural}!!!! \
19 | That was their sole mission and they were dedicated towards achieving it for the sake of {noun1}."
20 |
21 | print(madlib)
--------------------------------------------------------------------------------