しまノート

日々のメモや勉強内容をまとめていきます,自分のために.

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")

やりとり

【コード】

create_folder.ipynb

 

【実行結果】

実行結果