tag:crieit.net,2005:https://crieit.net/tags/%E3%81%AE%E3%82%93%E3%81%B3%E3%82%8A%E3%80%80Python%EF%BC%93/feed
「のんびり Python3」の記事 - Crieit
Crieitでタグ「のんびり Python3」に投稿された最近の記事
2019-07-02T22:05:59+09:00
https://crieit.net/tags/%E3%81%AE%E3%82%93%E3%81%B3%E3%82%8A%E3%80%80Python%EF%BC%93/feed
tag:crieit.net,2005:PublicArticle/15186
2019-07-01T22:25:53+09:00
2019-07-02T22:05:59+09:00
https://crieit.net/posts/Python3-5d1a09e1aa405
Python3を覚え直そうぜ☆(^~^)?
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 全部忘れた☆」</p>
<p><a href="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif?mw=700" alt="KIFUWARABE_80x100x8_01_Futu.gif" /></a><br />
「 入れ直せ☆」</p>
<p><a target="_blank" rel="nofollow noopener" href="https://qiita.com/muzudho1/items/299065eeda4fa0ea48b9">プログラミングのカリキュラムを勝手に作ろうぜ☆(^q^)</a></p>
<h1 id="Hello, world"><a href="#Hello%2C+world">Hello, world</a></h1>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 Visual studio code なら何でもできるだろ☆ ちょっと pip するぐらい☆」</p>
<p><a href="https://crieit.now.sh/upload_images/058791c2dd4c1604ce1bd9ec26d490ae5d1a072f3d7df.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/058791c2dd4c1604ce1bd9ec26d490ae5d1a072f3d7df.gif?mw=700" alt="OKAZAKI_Yumemi_80x80x8_02_Syaberu.gif" /></a><br />
「 何で Python3 を忘れてしまったの? これから 何度も覚えて 何度も忘れるの?」</p>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 そうなるな☆」</p>
<pre><code>print("Hello, world")
</code></pre>
<pre><code>Hello, world
</code></pre>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 だいじょぶ、だいじょぶ☆」</p>
<h1 id="15の14乗を15進数で"><a href="#15%E3%81%AE14%E4%B9%97%E3%82%9215%E9%80%B2%E6%95%B0%E3%81%A7">15の14乗を15進数で</a></h1>
<p><a href="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif?mw=700" alt="KIFUWARABE_80x100x8_01_Futu.gif" /></a><br />
「 じゃあ、15の14乗を15進数で表示してくれだぜ☆」</p>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 具体的でわらう☆」</p>
<pre><code>print(15 ** 14)
</code></pre>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 Python3 の累乗の書き方 気持ち悪いな……☆ クヌースの超指数 書きにくそうだぜ☆」</p>
<pre><code>29192926025390625
</code></pre>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 Wolfram alpha と同じだから 多分合ってるのだろう☆」</p>
<p><a href="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif?mw=700" alt="KIFUWARABE_80x100x8_01_Futu.gif" /></a><br />
「 15進数で☆」</p>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 標準で基数変換、進数変換ないのか☆」</p>
<p><a target="_blank" rel="nofollow noopener" href="http://iatlex.com/python/base_change">Python で10進数とn進数の変換</a><br />
<a target="_blank" rel="nofollow noopener" href="https://qiita.com/macoril/items/77ba050cad17f03ed46a">基数変換コマンドまとめ 〜N進数からM進数への変換をいろんな言語で〜</a></p>
<pre><code>def Base_10_to_n(x, base):
"""
10進 to N進
"""
if (int(x/base)):
return Base_10_to_n(int(x/base), base)+str(x % base)
return str(x % base)
x15 = Base_10_to_n(15 ** 14, 15)
print(x15)
</code></pre>
<pre><code>100000000000000
</code></pre>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 はい☆」</p>
<p><a href="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif?mw=700" alt="KIFUWARABE_80x100x8_01_Futu.gif" /></a><br />
「 これを使えば、お父んが 丸め でゴミにしてしまった資料を作り直せるな☆」</p>
<p><a href="https://crieit.now.sh/upload_images/058791c2dd4c1604ce1bd9ec26d490ae5d1a072f3d7df.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/058791c2dd4c1604ce1bd9ec26d490ae5d1a072f3d7df.gif?mw=700" alt="OKAZAKI_Yumemi_80x80x8_02_Syaberu.gif" /></a><br />
「 0から20まで 14乗したものを 並べてみましょう」</p>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 Python3 にも for文はあるだろ☆ 使おうぜ☆」</p>
<pre><code>for n in range(0, 21):
x15 = n ** 14
print("{}: {}".format(n, x15))
</code></pre>
<pre><code>0: 0
1: 1
2: 16384
3: 4782969
4: 268435456
5: 6103515625
6: 78364164096
7: 678223072849
8: 4398046511104
9: 22876792454961
10: 100000000000000
11: 379749833583241
12: 1283918464548864
13: 3937376385699289
14: 11112006825558016
15: 29192926025390625
16: 72057594037927936
17: 168377826559400929
18: 374813367582081024
19: 799006685782884121
20: 1638400000000000000
</code></pre>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 10進の累乗は多分合ってるぜ☆<br />
石黒Golaxy(いしくろゴラクシィ; 1,4,9,6,5,6,9,4,1)は10進2のべき乗の1桁目の並びだからな☆」</p>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 しかし 15進数の表示がおかしかったぜ☆」</p>
<p><a href="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1a0632d92c7.gif?mw=700" alt="KIFUWARABE_80x100x8_01_Futu.gif" /></a><br />
「 お父ん、桁ぞろえ してくれだぜ☆」</p>
<p><a target="_blank" rel="nofollow noopener" href="https://note.nkmk.me/python-format-zero-hex/">Python, formatで書式変換(0埋め、指数表記、16進数など)</a></p>
<pre><code>for n in range(0, 21):
x15 = n ** 14
# x15 = Base_10_to_n(n ** 14, 15)
print("{:>2}: {:>20}".format(n, x15))
</code></pre>
<pre><code> 0: 0
1: 1
2: 16384
3: 4782969
4: 268435456
5: 6103515625
6: 78364164096
7: 678223072849
8: 4398046511104
9: 22876792454961
10: 100000000000000
11: 379749833583241
12: 1283918464548864
13: 3937376385699289
14: 11112006825558016
15: 29192926025390625
16: 72057594037927936
17: 168377826559400929
18: 374813367582081024
19: 799006685782884121
20: 1638400000000000000
</code></pre>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 はい☆」</p>
<h1 id="次の日"><a href="#%E6%AC%A1%E3%81%AE%E6%97%A5">次の日</a></h1>
<p><a href="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1b37ebb99d6.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/5ac9fa3b390b658160717a7c1ef5008a5d1b37ebb99d6.gif?mw=700" alt="KIFUWARABE_80x100x8_01_Futu.gif" /></a><br />
「 Python3で 10240進数を作ってくれだぜ☆」</p>
<p><記事は移動しました><br />
<a href="https://crieit.net/posts/Python3-10240">Python3で10240進数を作ろうぜ☆(^~^)?</a></p>
<p><a href="https://crieit.now.sh/upload_images/058791c2dd4c1604ce1bd9ec26d490ae5d1a072f3d7df.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/058791c2dd4c1604ce1bd9ec26d490ae5d1a072f3d7df.gif?mw=700" alt="OKAZAKI_Yumemi_80x80x8_02_Syaberu.gif" /></a><br />
「 なんで 10240進数が 欲しかったのだったかしら?」</p>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 1の0乗から 20乗まで 21個並べるんだぜ☆」</p>
<p><a href="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/3da2d4690cf2c3f101c5cbc0e48729f55d1a06146df01.gif?mw=700" alt="KITASHIRAKAWA_Chiyuri_80x100x8_01_Futu.gif" /></a><br />
「 あっ、int型を MultiAdic に変換するメソッドを まだ作ってなかったぜ☆」</p>
<p><a href="https://crieit.now.sh/upload_images/058791c2dd4c1604ce1bd9ec26d490ae5d1a072f3d7df.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/058791c2dd4c1604ce1bd9ec26d490ae5d1a072f3d7df.gif?mw=700" alt="OKAZAKI_Yumemi_80x80x8_02_Syaberu.gif" /></a><br />
「 もう寝なさい!」</p>
<p><書きかけ></p>
むずでょ