├── .gitignore ├── 000_techgym_for_media.pdf ├── 000_techgym_info.pdf ├── 000_tokyo_chirashi.pdf ├── 000_tokyo_chirashi2.pdf ├── 000_テックジム 入校案内.pdf ├── 001_Root.pdf ├── 002_fc.pdf ├── 002_fc_susume.pdf ├── 00_python_manual.pdf ├── 00_python_open.pdf ├── 00_テックジム導入テキスト.pdf ├── 01_Introduction_en.pdf ├── 01_Pythonオープン講座(6題バージョン).pdf ├── 01_python_traial_en.pdf ├── An2k.py ├── Ch9H.py ├── D3mW.py ├── Jw2U.py ├── Lb65.py ├── P9j8.py ├── Techgym20240412.pdf ├── U2gr.py ├── Vh2i.py ├── Vu2x.py ├── a5Qm.py ├── chirashi ├── techgym-omo_ol.pdf └── techgym-ura_ol.pdf ├── gP6s.py ├── h9BY.py ├── hit_ball.py ├── hit_ball_2.py ├── rR76.py ├── techgym_group_lesson.pdf ├── v7Pi.py ├── x2Ns.py ├── x8UH.py ├── xS7K.py └── y5YT.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /000_techgym_for_media.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/000_techgym_for_media.pdf -------------------------------------------------------------------------------- /000_techgym_info.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/000_techgym_info.pdf -------------------------------------------------------------------------------- /000_tokyo_chirashi.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/000_tokyo_chirashi.pdf -------------------------------------------------------------------------------- /000_tokyo_chirashi2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/000_tokyo_chirashi2.pdf -------------------------------------------------------------------------------- /000_テックジム 入校案内.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/000_テックジム 入校案内.pdf -------------------------------------------------------------------------------- /001_Root.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/001_Root.pdf -------------------------------------------------------------------------------- /002_fc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/002_fc.pdf -------------------------------------------------------------------------------- /002_fc_susume.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/002_fc_susume.pdf -------------------------------------------------------------------------------- /00_python_manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/00_python_manual.pdf -------------------------------------------------------------------------------- /00_python_open.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/00_python_open.pdf -------------------------------------------------------------------------------- /00_テックジム導入テキスト.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/00_テックジム導入テキスト.pdf -------------------------------------------------------------------------------- /01_Introduction_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/01_Introduction_en.pdf -------------------------------------------------------------------------------- /01_Pythonオープン講座(6題バージョン).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/01_Pythonオープン講座(6題バージョン).pdf -------------------------------------------------------------------------------- /01_python_traial_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/01_python_traial_en.pdf -------------------------------------------------------------------------------- /An2k.py: -------------------------------------------------------------------------------- 1 | def calc(a): 2 | print('a = ' + str(a)) 3 | 4 | calc(3) 5 | -------------------------------------------------------------------------------- /Ch9H.py: -------------------------------------------------------------------------------- 1 | number = 2 2 | 3 | if number == 2: 4 | print('2です') 5 | -------------------------------------------------------------------------------- /D3mW.py: -------------------------------------------------------------------------------- 1 | number = 1 2 | 3 | if number == 1: 4 | print('1です') 5 | 6 | if number == 2: 7 | print('2です') 8 | -------------------------------------------------------------------------------- /Jw2U.py: -------------------------------------------------------------------------------- 1 | def calc(a, b): 2 | result = a * b 3 | print(str(a) + ' x ' + str(b)) 4 | return result 5 | 6 | calc_result = calc(3, 4) 7 | print(str(calc_result)) 8 | -------------------------------------------------------------------------------- /Lb65.py: -------------------------------------------------------------------------------- 1 | def calc(a, b): 2 | result = a * b 3 | print(str(a) + ' x ' + str(b)) 4 | return result 5 | 6 | calc_result = calc(3, 4) 7 | -------------------------------------------------------------------------------- /P9j8.py: -------------------------------------------------------------------------------- 1 | def calc(): 2 | 3 | calc() 4 | -------------------------------------------------------------------------------- /Techgym20240412.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/Techgym20240412.pdf -------------------------------------------------------------------------------- /U2gr.py: -------------------------------------------------------------------------------- 1 | number = 3 2 | 3 | if number == 1: 4 | print('1です') 5 | elif number == 2 or number == 3: 6 | print('2か3です') 7 | else: 8 | print('条件に当てはまりません') -------------------------------------------------------------------------------- /Vh2i.py: -------------------------------------------------------------------------------- 1 | def calc(): 2 | print('calcの中身') 3 | 4 | calc() 5 | -------------------------------------------------------------------------------- /Vu2x.py: -------------------------------------------------------------------------------- 1 | number = 1 2 | 3 | if number == 1: 4 | print('1です') 5 | elif number == 2: 6 | print('2です') 7 | -------------------------------------------------------------------------------- /a5Qm.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | print('じゃんけんスタート') 4 | 5 | print('あなたの手を入力してください') 6 | my_hand = int(input('0:グー, 1:チョキ, 2:パー')) 7 | you_hand = random.randint(0, 2) 8 | 9 | hand_diff = my_hand - you_hand 10 | 11 | if hand_diff == 0: 12 | print('あいこ') 13 | elif hand_diff == -1 or hand_diff == 2: 14 | print('勝ち') 15 | else: 16 | print('負け') 17 | -------------------------------------------------------------------------------- /chirashi/techgym-omo_ol.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/chirashi/techgym-omo_ol.pdf -------------------------------------------------------------------------------- /chirashi/techgym-ura_ol.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/chirashi/techgym-ura_ol.pdf -------------------------------------------------------------------------------- /gP6s.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | def start_message(): 4 | print('じゃんけんスタート') 5 | 6 | def get_my_hand(): 7 | print('あなたの手を入力してください') 8 | return int(input('0:グー, 1:チョキ, 2:パー')) 9 | 10 | def get_you_hand(): 11 | return random.randint(0, 2) 12 | 13 | def view_result(hand_diff): 14 | if hand_diff == 0: 15 | print('あいこ') 16 | elif hand_diff == -1 or hand_diff == 2: 17 | print('勝ち') 18 | else: 19 | print('負け') 20 | 21 | start_message() 22 | 23 | my_hand = get_my_hand() 24 | you_hand = get_you_hand() 25 | hand_diff = my_hand - you_hand 26 | 27 | view_result(hand_diff) 28 | -------------------------------------------------------------------------------- /h9BY.py: -------------------------------------------------------------------------------- 1 | number = 2 2 | 3 | print('2です') 4 | -------------------------------------------------------------------------------- /hit_ball.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | try_count = 1 4 | 5 | #ランダムの違う4つの数字の配列を作る 6 | def rand_ints_nodup(a, b, k): 7 | ns = [] 8 | while len(ns) < k: 9 | n = random.randint(a, b) 10 | if not n in ns: 11 | ns.append(n) 12 | return ns 13 | 14 | def play(): 15 | global try_count 16 | hit_count = 0 17 | ball_count = 0 18 | my_answer = input('【' + str(try_count) + '回目】違う数字4つの組み合わせを答えてください') 19 | my_1000s_number = my_answer[-4] 20 | my_100s_number = my_answer[-3] 21 | my_10s_number = my_answer[-2] 22 | my_1s_number = my_answer[-1] 23 | #ヒット探し 24 | if my_1000s_number == con_1000s_number: 25 | hit_count += 1 26 | if my_100s_number == con_100s_number: 27 | hit_count += 1 28 | if my_10s_number == con_10s_number: 29 | hit_count += 1 30 | if my_1s_number == con_1s_number: 31 | hit_count += 1 32 | #ボール探し 33 | if my_1000s_number == con_1s_number or my_1000s_number == con_10s_number or my_1000s_number == con_100s_number: 34 | ball_count += 1 35 | if my_100s_number == con_1s_number or my_100s_number == con_10s_number or my_100s_number == con_1000s_number: 36 | ball_count += 1 37 | if my_10s_number == con_1s_number or my_10s_number == con_100s_number or my_10s_number == con_1000s_number: 38 | ball_count += 1 39 | if my_1s_number == con_10s_number or my_1s_number == con_100s_number or my_1s_number == con_1000s_number: 40 | ball_count += 1 41 | #判定結果表示 42 | if hit_count == 4: 43 | print('おめでとう') 44 | print('正解は' + my_answer + 'です') 45 | print(str(try_count) + '回目での成功。お疲れ様でした') 46 | else: 47 | print(str(hit_count) + 'ヒット' + str(ball_count) + 'ボールです') 48 | try_count += 1 49 | play() 50 | 51 | #正解設定 52 | answer = rand_ints_nodup(0, 9, 4) 53 | con_1s_number = str(answer[3]) 54 | con_10s_number = str(answer[2]) 55 | con_100s_number = str(answer[1]) 56 | con_1000s_number = str(answer[0]) 57 | 58 | play() -------------------------------------------------------------------------------- /hit_ball_2.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | def play(try_count): 4 | hit_count = 0 5 | ball_count = 0 6 | my_answers = [] 7 | 8 | input_string = "" 9 | while True: 10 | tmp_string = input('【' + str(try_count) + '回目】違う数字4つの組み合わせを答えてください') 11 | if len(tmp_string) == 4 and tmp_string.isdigit(): 12 | input_string = tmp_string 13 | break 14 | #回答のリスト生成 15 | for i in range(0, 4): 16 | my_answers.append(int(input_string[i])) 17 | #ヒット探し 18 | for i in range(0, 4): 19 | if my_answers[i] == answers[i]: 20 | hit_count += 1 21 | #ボール探し 22 | for i in range(0, 4): 23 | if my_answers[i] in answers: 24 | ball_count += 1 #hit数が重複している 25 | ball_count -= hit_count 26 | #判定結果表示 27 | if hit_count == 4: 28 | print('おめでとう') 29 | print('正解は') 30 | print(answers) 31 | print(str(try_count) + '回目での成功。お疲れ様でした') 32 | return False 33 | else: 34 | print(str(hit_count) + 'ヒット' + str(ball_count) + 'ボールです') 35 | return True 36 | 37 | #正解リスト設定 38 | numbers = list(range(0, 10)) 39 | answers = random.sample(numbers, 4) 40 | 41 | try_count = 1 42 | while True: 43 | if play(try_count): 44 | try_count += 1 45 | else: 46 | break 47 | 48 | -------------------------------------------------------------------------------- /rR76.py: -------------------------------------------------------------------------------- 1 | number = 2 2 | 3 | if number == 1: 4 | print('1です') 5 | 6 | if number == 2: 7 | print('2です') 8 | -------------------------------------------------------------------------------- /techgym_group_lesson.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/techgymjp/techgym_python_open/d5c158149ea5e3a5b3821ebcee98113fa38db4c4/techgym_group_lesson.pdf -------------------------------------------------------------------------------- /v7Pi.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | print('じゃんけんスタート') 4 | 5 | print('あなたの手を入力してください') 6 | my_hand = int(input('0:グー, 1:チョキ, 2:パー')) 7 | you_hand = random.randint(0, 2) 8 | 9 | if my_hand == 0: 10 | if you_hand == 0: 11 | print('あいこ') 12 | elif you_hand == 1: 13 | print('勝ち') 14 | elif you_hand == 2: 15 | print('負け') 16 | elif my_hand == 1: 17 | if you_hand == 0: 18 | print('負け') 19 | elif you_hand == 1: 20 | print('あいこ') 21 | elif you_hand == 2: 22 | print('勝ち') 23 | elif my_hand == 2: 24 | if you_hand == 0: 25 | print('勝ち') 26 | elif you_hand == 1: 27 | print('負け') 28 | elif you_hand == 2: 29 | print('あいこ') 30 | -------------------------------------------------------------------------------- /x2Ns.py: -------------------------------------------------------------------------------- 1 | number = 3 2 | 3 | if number == 1: 4 | print('1です') 5 | elif number == 2: 6 | print('2です') 7 | else: 8 | print('条件に当てはまりません') -------------------------------------------------------------------------------- /x8UH.py: -------------------------------------------------------------------------------- 1 | def calc(a, b): 2 | result = a * b 3 | print(str(a) + ' x ' + str(b)) 4 | 5 | calc(3, 4) 6 | -------------------------------------------------------------------------------- /xS7K.py: -------------------------------------------------------------------------------- 1 | def calc(a, b): 2 | print('a = ' + str(a)) 3 | print('b = ' + str(b)) 4 | 5 | calc(3, 4) 6 | -------------------------------------------------------------------------------- /y5YT.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | print('じゃんけんスタート') 4 | 5 | print('あなたの手を入力してください') 6 | my_hand = int(input('0:グー, 1:チョキ, 2:パー')) 7 | you_hand = random.randint(0, 2) 8 | 9 | if my_hand == 0: 10 | if you_hand == 0: 11 | print('あいこ') 12 | elif you_hand == 1: 13 | print('勝ち') 14 | elif my_hand == 1: 15 | if you_hand == 0: 16 | print('負け') 17 | elif you_hand == 1: 18 | print('あいこ') 19 | --------------------------------------------------------------------------------