Welcome to EgniCode! In this fun 50-second YouTube Short, we’re diving into the world of Python with a quick and easy Random Joke Generator! 🤖🎉 Watch as we whip up a simple script that delivers laughs with just a few lines of code.
You’ll learn how to store jokes in a list and use Python’s random.choice() to select one at random. Want to brighten your day with a chuckle? Stick around to hear a hilarious joke!
Got any jokes of your own? Share them in the comments! Don't forget to like and share this video if you enjoyed it!
Check the description for the source code and more information.
Source Code:
python
Copy code
import random
jokes = [
"Why did the scarecrow win an award? Because he was outstanding in his field!",
"Why don’t skeletons fight each other? They don’t have the guts.",
"What do you call cheese that isn’t yours? Nacho cheese!"
]
def tell_joke():
return random.choice(jokes)
print("Here's your joke: ", tell_joke())
Resources:
Official Python Docs – Learn more about the random module.
EgniCode YouTube Channel – More fun Python projects and tutorials!
Hashtags: #Python #Coding #JokeGenerator #LearnToCode #EgniCode #PythonProjects #TechHumor #CodingForFun #RandomJokePython #PasswordGenerator #CodingTips #Cybersecurity #Programming #LearnPython #EgniCode #TechTutorial #Shorts #CodeNewbie #PasswordSecurity . . . .#Python #Coding #Programming #TechTutorial #PythonTips #PythonProjects #ObjectOriented Programming #LearnPython #Shorts #CodingForBeginners #TechShorts #Shorts, #YouTubeShorts, #Trending, #FYP, and #Codding, #LearnPython, #PythonProjects and #Education. #ProgrammingBasics, #ObjectOriented Programming, #TechExplained, and #PythonCoding. #tech #technology #gadgets #instatech #google #coding #electronics #gaming #computer #geek #programming #apple #Tech #digital #technews #code #innovation #python #programmers #techno #techie #samsung #software #android #trending #gadget #business #gamingsetup #programmer #coder