1
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.

ChatGPT で elixir を学ぶ (その1) Hello World

Last updated at Posted at 2024-03-03

ChatGPT でプログラム言語を学習できないかと思って試してみました。
elixir を学んでみます。

Python のプログラムを示して、elixir に変換してもらいます。

elixir のインストール

Ubuntu 23.10 にインストール

sudo apt install elixir

インストールされたバージョン

$ elixir -v
Erlang/OTP 25 [erts-13.1.5] [source] [64-bit] [smp:16:12] [ds:16:12:10] [async-threads:1] [jit:ns]

Elixir 1.14.0 (compiled with Erlang/OTP 24)

Python のプログラム

hello.py
#! /usr/bin/python
#
print("こんにちは")
print("今日は良い天気です。")

実行結果

$ ./hello.py 
こんにちは
今日は良い天気です。

ChatGPT に問い合わせ

次の Python のプログラムを elixir に変換して下さい。


#! /usr/bin/python
#
print("こんにちは")
print("今日は良い天気です。")

ChatGPT の回答

image.png

hello.exs
IO.puts("こんにちは")
IO.puts("今日は良い天気です。")

実行結果

$ elixir hello.exs 
こんにちは
今日は良い天気です。
1
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
1
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?