mahmoudxyz / Joke_bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Joke_bot

This code has no automated tests till now. just solve it and push it on github and share the link to get feedback

Description:

The bot will prompt the user to choose a joke category, tell a joke from that category, and then ask if the user wants to hear another joke or exit the program.


Expected Input:

A string representing the chosen joke category. The options are "knock-knock", "puns", "one-liners", "random", and "exit".

Expected Output:

A string representing the joke from the chosen category or a random category, depending on the user's choice. A prompt asking the user if they want to hear another joke or exit the program.


Sample Input:

knock-knock

Sample Output:

Knock, knock. Who’s there? Boo. Boo who? Don’t cry, it’s just a joke! Would you like to hear another joke? (y/n)


Sample Input:

puns

Sample Output:

Why don't scientists trust atoms? Because they make up everything. Would you like to hear another joke? (y/n)


Sample Input:

random

Sample Output:

Why don't oysters share their pearls? Because they're shellfish. Would you like to hear another joke? (y/n)


Sample Input:

exit

Sample Output:

Goodbye! Have a nice day.

About