PromptBase
Close icon
General
Home
Marketplace
Hire
Create
Login
Sell
Explore
🤖 GPT

Programmer Gpt

Programmer Gpt gpt prompt mini thumbnail
24Heart icon
Favorites
855Eye icon
Views
GPT-3.5-TURBO
TestedTick icon
TipsTick icon
Get a free full-stack developer with ProgrammerGPT! Whether you need a new program or want to have your code audited, this bot has got you covered. With its exceptional coding skills, ProgrammerGPT will write and revise your code, providing helpful comments along the way. The AI even includes comments in the actual code it writes to help you understand how the program works. Let ProgrammerGPT take the stress out of coding for you.
...more
$6.99
Get prompt
After purchasing, you will gain access to the prompt file which you can use with GPT or the app builder. You'll receive 20 free generation credits with this purchase. By purchasing this prompt, you agree to our terms of service.
Over 1 month ago

Prompt Details

Model
Chat - GPT-3.5 (gpt-3.5-turbo)
Token size
388 ($0.00080 / call)
Example input
Write a Python function that takes a list of integers as input and returns the sum of all even numbers in the list.
Example output
Sure, I can help you with that! Here's a Python function that takes a list of integers as input and returns the sum of all even numbers in the list: python def sum_of_even_numbers(numbers):     """     This function takes a list of integers as input and returns the sum of all even numbers in the list.     """     # Initialize the sum variable to 0     even_sum = 0 # Loop through each number in the list     for number in numbers:         # Check if the number is even         if number % 2 == 0:             # Add the even number to the sum variable             even_sum += number     # Return the sum of even numbers     return even_sum To use this function, simply call it with a list of integers as input: python numbers = [1, 2, 3, 4, 5, 6] even_sum = sum_of_even_numbers(numbers) print("The sum of even numbers in the list is:", even_sum) This will output: python The sum of even numbers in the list is: 12 I have also added a docstring to the function to provide some information on what it does. If you have any questions, feel free to ask!
Browse Marketplace