> For the complete documentation index, see [llms.txt](https://aryanai.gitbook.io/docs.aryanandarya/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aryanai.gitbook.io/docs.aryanandarya/my-skills/can-you-tell-me-chuck-norris-jokes/process-flow.md).

# Jokes Process Flow

## Identify the Jokes Category

Jokes category is identified based on the User Request, Jokes are currently spoken by Aryan in English language only

* If the user request is for "geeky/nerdy" jokes then the category is neutral
* If the user request is for "Chuck Norris" jokes then the category is chuck
* In case of no specific user request or neither of this categories then the category is defaulted as "all"

## Get the Jokes

Python **pyjokes** package is used to get the Jokes based on Language and category.

{% hint style="info" %}
[pyjokes ](https://pypi.org/project/pyjokes/)packages is used for one line jokes for programmers (jokes as a service)
{% endhint %}

* **Get Jokes for category as neutral**

```python
My_joke = pyjokes.get_joke(language="en", category="neutral")
PrintText(aifriend,"Geeky Joke for you is: " + My_joke)
SpeakText(aifriend,"Geeky Joke for you is: " + My_joke)
```

* **Get Jokes for category as neutral**

```python
My_joke = pyjokes.get_joke(language="en", category="chuck")
PrintText(aifriend,"Chuck Norris Joke for you is: " + My_joke)
SpeakText(aifriend,"Chuck Norris Joke for you is: " + My_joke)     
```

* **Get Jokes for category as ALL**

```python
My_joke = pyjokes.get_joke(language="en", category="all")
PrintText(aifriend,"Joke for you is: " + My_joke)
SpeakText(aifriend,"Joke for you is: " + My_joke)
```

{% hint style="success" %}
Respective jokes are provided to user and thereafter control is returned to NextStep
{% endhint %}
