1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

秀和システム「Python x API で動かして学ぶ AI活用プログラミング」0章

Posted at

秀和システム「Python x API で動かして学ぶ AI活用プログラミング」
0章をやってみた。
ここでは記事の内容ではなく、自環境での動作結果だけを記録のために記載しています。

環境

OS:Windows 11 Home 64 ビット オペレーティング システム
CPU:11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz 3.00 GHz
RAM:32.0 GB

ソース

image.png
(中略)
image.png

0_HelloStreamlit_app.py
import streamlit as st

st.title('計算アプリ')

# Input
a = st.number_input('数字1')
b = st.number_input('数字2')
method = st.sidebar.selectbox("計算方法", ['足し算', '掛け算'])

# process
if method == '足し算':
  c = a + b
elif method == '掛け算':
  c = a * b

# output
st.title('計算結果')
st.text(c)

実行結果

image.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?