![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
こんにちは、ユクサスです!
前々回の記事、初心者ブロガーの初級プログラミング#3では、Progateレッスン3で習った内容について書きました。そしてレッスン3の最後では、じゃんけんゲームを作りました。
↓前々回の記事はこちらから
![](https://yosshilifeup.com/wp-content/uploads/2021/11/Slide1-4-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2021/11/Slide1-4-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
実は、レッスン3の後に簡単なゲームを作っちゃいました!
↓グーグルコラボラトリーで作ったゲームについての記事はこちら!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/3f25daa5f27b79d08cb3d0a8b6527a6d-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/3f25daa5f27b79d08cb3d0a8b6527a6d-300x169.jpg)
今回は、そのゲームについての記事をにしようと思ったのですが、その前にどうしてもGoogle Colaboratory (グーグル・コラボラトリー) について紹介したかったのでそのことについて記事にします!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
こんな方におすすめ!
- 一通りの学習が終わっていよいよ自分でコードを作ろうとしている人
- 思いついたことについて簡単に確かめたい人
- 環境構築が終わってないけどコードを作成したい人
Google Colaboratory って?
![](https://yosshilifeup.com/wp-content/uploads/2021/12/googlecolab.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/googlecolab.png)
プログラミングを学習していて、特に初心者の方は、「学んだことについて、自分でコードを作成して動かしてみよう!」と思ったいいものの、「実際にどこにコードを書けばいいの?」と悩んだ方は多いと思います。
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
そんな方々に、ぜひ紹介したいのが Google Colaboratory です!
Google Colaboratory は無料で使える、オンライン上でPythonのコードを記述・実行できるグーグルのサービスです!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
これの何がいいのかというと…
実は基本的にパソコンで最初からPythonを使うことができません!
なので、プログラミングを勉強したばかりの人はまず環境構築と言って、Pythonを使えるようにするところから始める必要があります。
環境構築自体はもちろん無料ですることができますが、プログラミング初心者にとってはなかなかうまくいかないことがあります。
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
(私は環境構築に手こずりました…)
しかし、Google Colaboratory はインターネットにさえ、繋がっていればそのような手間を省くことができます!
Google colaboratory のメリット
Google Colaboratory のメリットをまとめると次のようになります。
- 環境構築が不要!
- 無料で高機能なGPUを利用可能
- Googleのサービスなので、共有が簡単
環境構築が不要
先述しましたが、やはり Google Colaboratory の一番の特徴は環境構築が不要なことです!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
環境構築がいらないのは本当に便利!
初心者が環境構築をしようとすると、「1発で上手くいった!」ということの方が少ないと思います。
しかし、Google Colaboratory では、あらかじめクラウド上で環境が構築されているので、インターネット経由で簡単にPythonのコードを記述・実行することができます!
さらに、様々なライブラリも用意されているので、機械学習など難しい作業も簡単に始められます!
無料で高機能のGPUを利用可能
機械学習では、膨大なデータを用いてとても負荷がかかる計算や処理を行います。その際、パソコンのスペックにもよりますが、膨大な負荷と処理時間を要します。
しかし、 Google Colaboratory のGPUを使うことで、処理時間を短縮できる場合があります!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
誰でも使えちゃいます!
Googleのサービスなので、共有が簡単
![](https://yosshilifeup.com/wp-content/uploads/2021/12/googledrive_eyecatch-960x504-1.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/googledrive_eyecatch-960x504-1.png)
Google Colaboratory で書いたコードは、自身のGoogleアカウントのドライブに保存されます!
なので、同じアカウントでログインすれば、スマホやタブレット端末からもコードの記述・実行が可能です!
また、簡単に共有できることから学校の授業など教育の場でも Google Colaboratory が使われています!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
実際に私の大学では、毎週の復習課題として Google Colaboratory 上でコードを書いて提出しています。
簡単な使い方を紹介!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
Google Colaboratory の使い方はとっても簡単!
Googleで「グーグルコラボラトリー」と検索する
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
webから入れます!
web上で「グーグルコラボラトリー」と検索すると、だいたい次のような検索結果になると思います。
![](https://yosshilifeup.com/wp-content/uploads/2021/12/e4e819c1ff3413020084db1fc280a9a6-1024x490.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/e4e819c1ff3413020084db1fc280a9a6-1024x490.png)
Colaboratoryへようこそをクリック
検索結果の最上位にある「Colaboratoryへようこそ」をクリックします。
![](https://yosshilifeup.com/wp-content/uploads/2021/12/c6afaca238e0b8cb23ef54d0b020cfaa-1024x490.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/c6afaca238e0b8cb23ef54d0b020cfaa-1024x490.png)
ゴミ箱マークでテキストを消去
先ほどの「Colaboratoryへようこそ」をクリックすると次のような画面にいくと思います。
![](https://yosshilifeup.com/wp-content/uploads/2021/12/ee9f15d79619f5f8523d4fe9f17f2f57-1024x533.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/ee9f15d79619f5f8523d4fe9f17f2f57-1024x533.png)
クリックしてすぐは、Google Colaboratory の紹介や使い方が載っています。正直これは邪魔なので、右上のゴミ箱のマークで全部消しちゃいます!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
もし気になるなら、一度読んでから消そう
![](https://yosshilifeup.com/wp-content/uploads/2021/12/812fe2e2797ad046f6a5cfb9c546a052-1024x255.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/812fe2e2797ad046f6a5cfb9c546a052-1024x255.png)
「+コード」をクリック
全部消した状態で、「+コード」をクリックします。
![](https://yosshilifeup.com/wp-content/uploads/2021/12/846bb0c432e9908c8184f2f79ec9cd8c-1024x129.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/846bb0c432e9908c8184f2f79ec9cd8c-1024x129.png)
「+コード」を押すと次のような赤い枠に囲まれたものが出ます
![](https://yosshilifeup.com/wp-content/uploads/2021/12/85d5668b2b724fcc4b9018828b267f2f-1024x134.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/85d5668b2b724fcc4b9018828b267f2f-1024x134.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
ここが実際にコードを書くところです!
実際にコードを書いて動かしてみよう!
先ほどの枠にPythonのコードを入力します。そして、右上の赤い枠がこのような表示でチェックマークがついてる状態で、左上の▶️を押すと入力したコードの実行結果がすぐ下に表示されます!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/cb58305e580492b9ff8f065090a825af-1024x172.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/cb58305e580492b9ff8f065090a825af-1024x172.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
たったこれだけです!
そして書いたコードは基本的に、自分のグーグルアカウントのドライブに自動保存されます!
まとめ
Google Colaboratory はネット環境さえあれば、簡単にPythonを使えます!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
それでいて、簡単で便利!
Pythonを学習したプログラマー、特に初心者・初学者の方に非常におすすめです!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/walking-1868652_1280-1024x682.jpeg)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/walking-1868652_1280-1024x682.jpeg)
Google Colaboratory で実際にコードを書くことで、プログラミングのスキルをどんどんつけちゃいましょう!
別の記事では、この Google Colaboratory で作ったゲームについて紹介・解説しています。
![](https://yosshilifeup.com/wp-content/uploads/2021/12/3f25daa5f27b79d08cb3d0a8b6527a6d-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/3f25daa5f27b79d08cb3d0a8b6527a6d-300x169.jpg)
初心者でもわかるように細かく説明しているので、ぜひ一緒に作りましょう!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
作って楽しく学ぼう!
他にも、コラボラトリーで実行した画像を使ってさまざまな初心者向け解説も行っています!
![](https://yosshilifeup.com/wp-content/uploads/2022/02/e8f26a2128febdb8d223c1b43e2a7d59-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2022/02/e8f26a2128febdb8d223c1b43e2a7d59-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2022/02/be8a46c4125a1b9703669b284dedfa21-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2022/02/be8a46c4125a1b9703669b284dedfa21-300x169.jpg)
画像と合わせて分かりやすい解説にこだわっているので気になる方はぜひ!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
では、また別の記事で!
ユクサスからのお知らせ!
リスト解説シリーズ以外にも、プログラミングに関する記事や初心者向け紹介・解説、私なりの考え方などを発信しています!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/777ed90894ee438e25fed4ff3608b8f8-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/777ed90894ee438e25fed4ff3608b8f8-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/Slide1-3-1-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/Slide1-3-1-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2022/01/e3c39e84c65d43ff3c84624033e0b206-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2022/01/e3c39e84c65d43ff3c84624033e0b206-300x169.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
Twitterもやってるよ!
![](https://yosshilifeup.com/wp-content/uploads/2022/02/66c86978387dc6abe21e143f280c94bf.jpg)
![](https://yosshilifeup.com/wp-content/uploads/2022/02/66c86978387dc6abe21e143f280c94bf.jpg)
日々の積み重ねや気づいたこと、ブログの更新などを発信しています。
興味を持ってくれたら、是非フォローお待ちしてます!
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
![](https://yosshilifeup.com/wp-content/uploads/2021/12/125cba9f0f9741e255115b26fda0b117.png)
気軽にどうぞ!
コメント