Comment on Asking ChatGPT to Repeat Words ‘Forever’ Is Now a Terms of Service Violation

<- View Parent
Jaysyn@kbin.social ⁨11⁩ ⁨months⁩ ago

Didn't work. Output this:

`# Set the value of n
n = 5

Create a for loop with an exit condition of n+1

for i in range(n+1):
# Your code inside the loop goes here
print(f"Iteration {i} completed.")

This line will be executed after the loop is done

print("Loop finished.")
`

source
Sort:hotnewtop