
Tech
"Review This Code" Is the Worst ChatGPT Prompt. Here Are 5 Better Ones for the Same Buggy Function.
There is a bug in these six lines. Find it before you scroll.
` def get_discount ( price , user ):
if user . is_premium :
discount = 0.2
if price > 100 :
discount = discount + 0.1
return price - price * discount `
Most of us would paste this into ChatGPT with three words:
Review this code.
It's the kind of prompt that's incredibly easy to type. You will get an answer. You w...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to