Wednesday, 6 April 2022

P#23 Jokes Apart

 Jokes Chokes

You are bored. 

pip install jokes

import pyjokes
joke=pyjokes.get_joke(language='en', category= 'neutral')
print(joke)

Output: Enjoy!!! 

I've been using Vim for a long time now, mainly because I can't figure out how to exit.
Hey this is the code will play the joke, so you can listen@@@ 
pip install gTTS playsound
import os
import pyjokes
from gtts import gTTS
from playsound import playsound

joke=pyjokes.get_joke(language='en', category= 'neutral')

print(joke)

myobj = gTTS(text=joke, lang='en', slow=False)

myobj.save("joke.mp3")

#os.system('mpg321 joke.mp3')
playsound('joke.mp3')

Be a Columbus in discovering Python abilities!!!!  Happy learning @ AMET ODL...👧👧👧👧👧

No comments:

Post a Comment

Green Energy - House Construction

With Minimum Meterological data, how i can build model for Green Energy new construction WIth Minimum Meterological data, how i can build m...