Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

lesson 13 f - strings

オープン
#3 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
content

調査の方向性

f-strings に関するレッスン 13 の rps5.py から始め、参照されている 26、33、34、62、63、64 行を確認します。提案された簡略化をレッスン周辺のコードと比較し、適切な場合は例を更新します。完了の条件は、不要な変換を使わず、意図された f-string の使い方をレッスン全体で一貫して示していることです。

索引モデルが issue の本文から書いたものです。

説明

Really enjoying your course. So much packed into every lesson, really well done!

Just wanted to comment that when you change the concatenated strings in rps5.py to f-strings I think it should be noted that you can further simplify:
f string allows multiple datatypes so several castings to different variable types can be omitted:

ln 26 player = int(playerchoice)
and computer = int(computerchoice)

the print statements on ln 33, 34 can be shortened:

from: print("\nYou chose {str(RPS(player)).replace('RPS.', '').title()}")
to: print(f"\nYou chose {playerchoice.replace('RPS.', '').title()}")

also print statements ln 62, 63 & 64 do not need the str constructor:
print("\nGame count: {str(game_count)) >> print(f"\nGame count: {game_count}")

主要言語
Python
スター
567
フォーク
315
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

gitdagray/python-course のほかの issue

gitdagray/python-course の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。