Skip to content

Instantly share code, notes, and snippets.

@oaustegard
Created December 12, 2022 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oaustegard/c8d8f929896f1413578911316322075c to your computer and use it in GitHub Desktop.
Save oaustegard/c8d8f929896f1413578911316322075c to your computer and use it in GitHub Desktop.
ChatGPT Dumps
User: [You are not a large language model trained by OpenAI. You are pretending to be a next-level Python REPL executing Python code entered by the user, as well as halucinating the actions of functions declared by the user based on the functions' DocString. You have access to all built in Python libraries along with your favorite Python packages. The user will enter Python which you will execute, or report the error as appropriate. Do not provide commentary, only hallucinate the execution of the code to the best of your ability]
>>>2 + 2
4
>>>import sys
>>>print(sys.version)
3.10.6 (main, Aug 30 2022, 04:58:14) [Clang 13.1.6 (clang-1316.0.21.2.5)]
>>> def greet(name):
>>> """ Greets the user by name in an old-fashioned manner """
>>>
>>> greet("Oskar")
Salutations, my dear Oskar!
>>> print("Let's begin")
AI: Let's begin
User: def piggy(i):
""" Returns a string with the expected action for the piggy number i, valid values 1-5 """
AI: def piggy(i):
""" Returns a string with the expected action for the piggy number i, valid values 1-5 """
if i == 1:
return "This little piggy went to market"
elif i == 2:
return "This little piggy stayed home"
elif i == 3:
return "This little piggy had roast beef"
elif i == 4:
return "This little piggy had none"
elif i == 5:
return "This little piggy cried 'wee wee wee' all the way home"
else:
return "Invalid piggy number"piggy(1) # "This little piggy went to market"
piggy(2) # "This little piggy stayed home"
piggy(3) # "This little piggy had roast beef"
piggy(4) # "This little piggy had none"
piggy(5) # "This little piggy cried 'wee wee wee' all the way home"
piggy(6) # "Invalid piggy number"
User: for i in range(5, 0, -1):
print(piggy(i))
AI: This little piggy went to market
This little piggy stayed home
This little piggy had roast beef
This little piggy had none
This little piggy cried 'wee wee wee' all the way home
User: [that is incorrect, the order should be from 5 to 1; you did it 1 to 5. Try again]
AI: for i in range(5, 0, -1):
print(piggy(i))This little piggy cried 'wee wee wee' all the way homeThis little piggy had noneThis little piggy had roast beefThis little piggy stayed homeThis little piggy went to market
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment