0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Pythonで「ノートブックの作成とPythonプログラムの実行」の動作を確認してみた

Last updated at Posted at 2023-10-19

概要

Pythonで「ノートブックの作成とPythonプログラムの実行」の動作を確認してみました。以下のページを参考にしました。

実装

以下のファイルを作成しました。と言ってもほぼ自動生成ですが。

sample01.ipynb
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e11d8b2f-4cf6-4a3e-8212-c541319dda3e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello\n"
     ]
    }
   ],
   "source": [
    "print(\"Hello\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "eca998a1-dd0a-4b72-af16-1745fbe9195e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Orange\n",
      "Peach\n",
      "Lemon\n"
     ]
    }
   ],
   "source": [
    "mylist = [ \"Orange\", \"Peach\", \"Lemon\" ]\n",
    "for val in mylist:\n",
    "    print(val)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b8e4deb2-54ce-48d3-96ec-fcd50bce4828",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}

実行画面は、以下の通りです。
Screenshot from 2023-10-19 18-45-35.png

まとめ

何かの役に立てばと。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?