Skip to content

宿題009-お金持ち探す、データタイプ(集合) #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
domanthan opened this issue Aug 31, 2018 · 0 comments
Open

宿題009-お金持ち探す、データタイプ(集合) #9

domanthan opened this issue Aug 31, 2018 · 0 comments

Comments

@domanthan
Copy link
Contributor

domanthan commented Aug 31, 2018

お金持ち探す、データタイプ(集合)

前振り

お金の話はみんな大好きでしょう?女性なら、お金持ちを旦那にすれば一生安泰かもしれないが、
男なら、なんとかしてお金持ちになる方法を探さなければ。。。とも限らないです。

要件説明

様々の通貨を一定の額を所有する男たちから、お金持ちを探すゲームをしよう。
お金持ちの基準は100万ドル相当な額を上まる金銭を持っているかどうかによる。
なお、この日の為替相場は以下になっている。

1USD=109JPY
1EUR=1.159USD
1AUD=0.89USD
1USD=6.89CHN
1PND=1.45 USD

男の名前         所持金

=============================
  トーム         92万  EUR  
  ジェリー        359万 CHN
  フランク        109万 AUD
  サム          8399万 JPY
  ジェフリー       78万   PND

下記クラスを完成してください。

class RichManSet:
     richmen = {}
 ””” パラメータmanに対して、100万ドルを持っているかをチェックし,
   YESの場合、richmen集合に入れる。
 ”””
 def add(man):
       ## TODO

class Person:
     name="NONAME"
     amount=0
     ccy=""
     

問題

上記男集合からからお金持ちを探すプログラムを組んでください。
 出力: リーチマン: 。。。。。。。
     Poor man : .........

reference

宿題学習ポイント(Concept)

https://docs.python.org/ja/3.7/tutorial/datastructures.html#sets
https://docs.python.org/ja/3.7/library/stdtypes.html#set-types-set-frozenset

参考実装

提供しない。 ここまで学んだことを駆使してください。

言語リファレンス

https://docs.python.org/ja/3/reference/index.html

宿題の提出について

githubに宿題をコミットする際、必ず下記の様なフォルダ構成にしたがって欲しいです。
宿題を完成させたエビデンスファイルも合わせて出してください。できれば。

   --src  
     ---- 「ご自分のgithubid]  
         ---   less001  
               -- file001.py  
               -- evidence001.txt  
@domanthan domanthan changed the title 宿題009-データタイプ()(予定) 宿題009-データタイプ(集合)(予定) Aug 31, 2018
@domanthan domanthan changed the title 宿題009-データタイプ(集合)(予定) 宿題009-お金持ち探す、データタイプ(集合) Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant