Prompt Details
Model
Chat - GPT-4 (gpt-4)
Token size
132 ($0.00400 / call)
Example input
1. [Function 1]: [Describe function] : 1. add_numbers: A function that adds two numbers.
2. [Function 2]: [Describe function] : 2. print_string: A function that prints a string.
3. [Function 3]: [Describe function] : 3. factorial: A function that calculates the factorial of a number.
4. [Function 4]: [Describe function] : 4. check_even_odd: A function that checks if a number is even or odd.
5. [Function 5]: [Describe function] : 5. find_max: A function that finds the maximum of three numbers.
Example output
Absolutely! Here are the Python functions you're asking for:
1. `add_numbers`: A function that adds two numbers.
```python
def add_numbers(num1, num2):
return num1 + num2
```
2. `print_string`: A function that prints a string.
```python
def print_string(string):
print(string)
```
3. `factorial`: A function that calculates the factorial of a number.
```python
def factorial(num):
if num == 0:
return 1
else:
return num * factorial(num - 1)
```
4. `check_even_odd`: A function that checks if a number is even or odd.
```python
def check_even_odd(num):
if num % 2 == 0:
return "Even"
else:
return "Odd"
```
5. `find_max`: A function that finds the maximum of three numbers.
```python
def find_max(num1, num2, num3):
return max(num1, num2, num3)
```
I hope these help! Do you have any other questions about these functions ?
By purchasing this prompt, you agree to our terms of service
GPT-4
๐ Ready to dive into the world of coding? Our ChatGPT prompt is here to guide you! ๐ฏ
โจ Choose from 5 basic functions: `add_numbers`, `print_string`, `factorial`, `check_even_odd`, or `find_max`. ๐ฅ๏ธ
๐ Simply replace `[function_name]` with your chosen function, and voila! Instant, custom code at your fingertips. ๐
๐ก Perfect for beginners or those needing a quick refresher. Let's start coding! ๐
...more
Added over 1 month ago

