Hello. Nice to meet you. I am Japanese.
I am not very good at English, so I may not be able to explain things well.
Even so, I am studying because I want to learn about Python.
The reason is that I want to use it for writing senryu, which is my hobby.
I asked ChatGPT to create a program for me,
but when I pasted it into Python and ran it, it gave me an error and did not work.
Here is the program.
Please tell me what is wrong and what I should do.
Thank you very much.
I tested your script. It is working just fine. Maybe it is other lines of code that are active on your terminal that are causing the error? Generally, when an exception is generated, it points to the line that is causing the error.