ChatGPTでUIをつくってみたい
【目的】機能作成したコード用のUIを作成
programingwoganbaru.hatenablog.jp
【ChatGPTとのやりとり】
以下のコード用にUIを作成して.
import os
directory = input("Enter the directory where you want to create the folder: ")
folder_name = input("Enter the name of the folder you want to create: ")
path = os.path.join(directory, folder_name)
try:
os.mkdir(path)
print(f"Successfully created the directory {path}")
except OSError:
print(f"Creation of the directory {path} failed")
【コード】
【実行結果】