Chat GPT Prompts For Coders

Vikas612

Junior Member
Joined
Mar 27, 2021
Messages
178
Reaction score
343
Chat GPT Prompts For Coders
“Write a function in [Python] to calculate the factorial of a given number”
“Create a [JavaScript] program to implement a basic calculator”
“Generate a [C++] code to sort an array of integers using the bubble sort algorithm”
“Write a [Python] script to scrape data from a website and save it to a CSV file”
“Create a [Java] program to implement a simple chatbot using natural language processing”
“Generate a [C#] code to create a basic game using the Unity engine”
“Write a [Python] function to check if a given string is a palindrome”
“Create a [JavaScript] program to create a responsive web page layout using CSS and HTML”
“Generate a [C++] code to implement a basic machine learning algorithm, such as linear regression”
“Write a [Python] script to automate tasks using Selenium library”
“Create a [Java] program to implement a basic encryption algorithm”
“Generate a [C#] code to create a basic windows form application”
“Write a [Python] function to generate a random password”
“Create a [JavaScript] program to implement a basic CRUD operations using MongoDB”
“Generate a [C++] code to implement a basic data structure, such as a linked list”
“Write a [Python] script to read and analyze data from an excel sheet”
“Create a [Java] program to implement a basic algorithm for image processing”
“Generate a [C#] code to create a basic WPF application”
“Write a [Python] function to implement a basic natural language processing task”
“Create a [JavaScript] program to implement a basic blockchain”
“I have a h264 video that is too large for Twitter; please write a bash script to convert it to the proper format and the highest supported quality”
“Create a TypeScript function that computes the implied volatility using the Black-Scholes model. Where the inputs are the underlying price, strike price, free-risk rate, and option price. Write it step by step, with an explanation for each step”
“Please only reply using p5.js code. Please concisely implement a cellular automaton life game with 30 lines or less. – 800,800 by 800 pixels -Sorry, no line breaks. Please refrain from leaving comment-outs.”
“Find bug in this
Code:
”[/TD]
[/TR]
[TR]
[TD]“This year, the elves invested in a gift-wrapping machine. However, it isn’t programmed! An algorithm that aids it in the task must be developed. Many presents are given to the machine. Each present is a string. Each gift must be wrapped by the machine and set in a display of other wrapped gifts. To wrap a gift, you must place the wrapping paper around the string, which is represented by the * symbol. For instance: const gifts are [B][“cat,” “game,” and “socks”][/B]. console.log const wrapped = wrapping(gifts) (wrapped) / [B][“ncatn,” “ngamen,” and “nsocksn**”] [/B]*/ As you can see, the thread is wrapped in the wrapping paper. The corners are also wrapped in wrapping paper on the top and bottom to prevent any gaps.”[/TD]
[/TR]
[TR]
[TD]“What exactly does this strange-looking regex do? ((([01]?\d)|(two[0-three])): ([0-five]?\d)) ((:[0-five]?\d))?\s? ?b/i; (am|pm)”[/TD]
[/TR]
[TR]
[TD]“I require UI assistance. I need three action buttons for a card component that includes a long statement, but I don’t want the buttons to always be visible. I need a good UI that functions on both desktop and mobile since if I try to show the buttons on Hoover, that logic won’t work on mobile.”[/TD]
[/TR]
[TR]
[TD]“Provide me a roadmap for learning and become a Full Stack Software Developer [Desired Field]”[/TD]
[/TR]
[TR]
[TD]“Write a [Python] script to implement a neural network for image classification using TensorFlow”[/TD]
[/TR]
[TR]
[TD]“Write a [Python] script to implement a reinforcement learning algorithm for solving game-playing AI”[/TD]
[/TR]
[TR]
[TD]“Write a [Python] script to implement a natural language processing task using BERT or GPT-2 model”[/TD]
[/TR]
[TR]
[TD]“Rewrite this [Java] code into [Desired Language]”[/TD]
[/TR]
[TR]
[TD]Generate a [C++] code to implement a basic simulation of a self-driving car using ROS (Robot Operating System)”[/TD]
[/TR]
[TR]
[TD]“Write a [Python] script to implement a deep learning model for natural language generation”[/TD]
[/TR]
[TR]
[TD]“Create a [JavaScript] program to implement a basic chatbot using Dialogflow”[/TD]
[/TR]
[TR]
[TD]“Generate a [C#] code to create a basic AI game agent using A* algorithm”[/TD]
[/TR]
[/TABLE]
 
This is not what you actually need ahahah you need something like "how to do this in this library" so you can learn the library faster. That's the only use of chatgpt I do
 
Chat GPT Prompts For Coders
“Write a function in [Python] to calculate the factorial of a given number”
“Create a [JavaScript] program to implement a basic calculator”
“Generate a [C++] code to sort an array of integers using the bubble sort algorithm”
“Write a [Python] script to scrape data from a website and save it to a CSV file”
“Create a [Java] program to implement a simple chatbot using natural language processing”
“Generate a [C#] code to create a basic game using the Unity engine”
“Write a [Python] function to check if a given string is a palindrome”
“Create a [JavaScript] program to create a responsive web page layout using CSS and HTML”
“Generate a [C++] code to implement a basic machine learning algorithm, such as linear regression”
“Write a [Python] script to automate tasks using Selenium library”
“Create a [Java] program to implement a basic encryption algorithm”
“Generate a [C#] code to create a basic windows form application”
“Write a [Python] function to generate a random password”
“Create a [JavaScript] program to implement a basic CRUD operations using MongoDB”
“Generate a [C++] code to implement a basic data structure, such as a linked list”
“Write a [Python] script to read and analyze data from an excel sheet”
“Create a [Java] program to implement a basic algorithm for image processing”
“Generate a [C#] code to create a basic WPF application”
“Write a [Python] function to implement a basic natural language processing task”
“Create a [JavaScript] program to implement a basic blockchain”
“I have a h264 video that is too large for Twitter; please write a bash script to convert it to the proper format and the highest supported quality”
“Create a TypeScript function that computes the implied volatility using the Black-Scholes model. Where the inputs are the underlying price, strike price, free-risk rate, and option price. Write it step by step, with an explanation for each step”
“Please only reply using p5.js code. Please concisely implement a cellular automaton life game with 30 lines or less. – 800,800 by 800 pixels -Sorry, no line breaks. Please refrain from leaving comment-outs.”
“Find bug in this
Code:
”[/TD]
[/TR]
[TR]
[TD]“This year, the elves invested in a gift-wrapping machine. However, it isn’t programmed! An algorithm that aids it in the task must be developed. Many presents are given to the machine. Each present is a string. Each gift must be wrapped by the machine and set in a display of other wrapped gifts. To wrap a gift, you must place the wrapping paper around the string, which is represented by the * symbol. For instance: const gifts are [B][“cat,” “game,” and “socks”][/B]. console.log const wrapped = wrapping(gifts) (wrapped) / [B][“ncatn,” “ngamen,” and “nsocksn**”] [/B]*/ As you can see, the thread is wrapped in the wrapping paper. The corners are also wrapped in wrapping paper on the top and bottom to prevent any gaps.”[/TD]
[/TR]
[TR]
[TD]“What exactly does this strange-looking regex do? ((([01]?\d)|(two[0-three])): ([0-five]?\d)) ((:[0-five]?\d))?\s? ?b/i; (am|pm)”[/TD]
[/TR]
[TR]
[TD]“I require UI assistance. I need three action buttons for a card component that includes a long statement, but I don’t want the buttons to always be visible. I need a good UI that functions on both desktop and mobile since if I try to show the buttons on Hoover, that logic won’t work on mobile.”[/TD]
[/TR]
[TR]
[TD]“Provide me a roadmap for learning and become a Full Stack Software Developer [Desired Field]”[/TD]
[/TR]
[TR]
[TD]“Write a [Python] script to implement a neural network for image classification using TensorFlow”[/TD]
[/TR]
[TR]
[TD]“Write a [Python] script to implement a reinforcement learning algorithm for solving game-playing AI”[/TD]
[/TR]
[TR]
[TD]“Write a [Python] script to implement a natural language processing task using BERT or GPT-2 model”[/TD]
[/TR]
[TR]
[TD]“Rewrite this [Java] code into [Desired Language]”[/TD]
[/TR]
[TR]
[TD]Generate a [C++] code to implement a basic simulation of a self-driving car using ROS (Robot Operating System)”[/TD]
[/TR]
[TR]
[TD]“Write a [Python] script to implement a deep learning model for natural language generation”[/TD]
[/TR]
[TR]
[TD]“Create a [JavaScript] program to implement a basic chatbot using Dialogflow”[/TD]
[/TR]
[TR]
[TD]“Generate a [C#] code to create a basic AI game agent using A* algorithm”[/TD]
[/TR]
[/TABLE]
Here are some chat GPT prompts tailored for coders and developers:
  1. "Looking for coding inspiration? Ask GPT for suggestions on your next programming project."

  2. "Stuck on a bug or coding challenge? Describe your issue, and let GPT offer solutions and debugging tips."

  3. "Need help with a specific programming language? Ask GPT for code snippets or explanations on syntax and usage."

  4. "Exploring a new framework or library? Ask GPT for a beginner's guide and best practices."

  5. "Curious about the latest coding trends and technologies? Ask GPT for insights and resources on emerging tech."

  6. "Time for a coding break? Let GPT tell you a programming joke or share interesting tech trivia."

  7. "Discussing software design patterns? Ask GPT for explanations and real-world use cases."

  8. "Planning a tech interview? Test your coding skills with GPT's algorithmic and data structure challenges."

  9. "Debating the pros and cons of different development methodologies? Engage in a discussion with GPT."

  10. "Seeking advice on software architecture? Ask GPT for recommendations and design principles."
 
I used to use ChatGPT a lot for coding. It works ok, but since I have tested Github Copilot, I find it easier to use, as you can type what you want directly in your programming IDE, without having to go on ChatGPT. As Copilot has the full context of your code, it is usually better at directly using the right variable names, which makes it faster to code than copy pasting from ChatGPT and modifying all variables.
 
They would patch all my methods if I posted my prompts here. Damn.

It seems I have really special requests for ChatGPT. Some shit that would take hours to write normally as I'm bad at math and algorithms (crying and failing :D).

I can give you some generic code. It's cool cause there are no syntax errors even with this pretty short prompt.

Prompt: call ifs in random order; node js

Code:
// Define your functions or statements
function statement1() {
  console.log("Statement 1 executed");
}

function statement2() {
  console.log("Statement 2 executed");
}

function statement3() {
  console.log("Statement 3 executed");
}

function statement4() {
  console.log("Statement 4 executed");
}

// Create an array of your functions
const statements = [statement1, statement2, statement3, statement4];

// Function to shuffle the array randomly
function shuffleArray(array) {
  for (let i = array.length - 1; i > 0; i--) {
    const j = Math.floor(Math.random() * (i + 1));
    [array[i], array[j]] = [array[j], array[i]];
  }
}

// Shuffle the array
shuffleArray(statements);

// Execute the statements in random order
for (const statement of statements) {
  statement();
}
 
Last edited:
Back
Top