小日子语50音图测试.py
🖥️

小日子语50音图测试.py

汗流浃背了牢底…..
弄了个测小日子语50音图测试的python代码
我感觉80%以后会更新。
import random # Define the 50 Kana characters in Hiragana and Katakana along with their Romanized pronunciations kana_chart = { 'あ': 'a', 'い': 'i', 'う': 'u', 'え': 'e', 'お': 'o', 'か': 'ka', 'き': 'ki', 'く': 'ku', 'け': 'ke', 'こ': 'ko', 'さ': 'sa', 'し': 'shi', 'す': 'su', 'せ': 'se', 'そ': 'so', 'た': 'ta', 'ち': 'chi', 'つ': 'tsu', 'て': 'te', 'と': 'to', 'な': 'na', 'に': 'ni', 'ぬ': 'nu', 'ね': 'ne', 'の': 'no', 'は': 'ha', 'ひ': 'hi', 'ふ': 'fu', 'へ': 'he', 'ほ': 'ho', 'ま': 'ma', 'み': 'mi', 'む': 'mu', 'め': 'me', 'も': 'mo', 'や': 'ya', 'ゆ': 'yu', 'よ': 'yo', 'ら': 'ra', 'り': 'ri', 'る': 'ru', 'れ': 're', 'ろ': 'ro', 'わ': 'wa', 'を': 'wo', 'ん': 'n', # Katakana 'ア': 'a', 'イ': 'i', 'ウ': 'u', 'エ': 'e', 'オ': 'o', 'カ': 'ka', 'キ': 'ki', 'ク': 'ku', 'ケ': 'ke', 'コ': 'ko', 'サ': 'sa', 'シ': 'shi', 'ス': 'su', 'セ': 'se', 'ソ': 'so', 'タ': 'ta', 'チ': 'chi', 'ツ': 'tsu', 'テ': 'te', 'ト': 'to', 'ナ': 'na', 'ニ': 'ni', 'ヌ': 'nu', 'ネ': 'ne', 'ノ': 'no', 'ハ': 'ha', 'ヒ': 'hi', 'フ': 'fu', 'ヘ': 'he', 'ホ': 'ho', 'マ': 'ma', 'ミ': 'mi', 'ム': 'mu', 'メ': 'me', 'モ': 'mo', 'ヤ': 'ya', 'ユ': 'yu', 'ヨ': 'yo', 'ラ': 'ra', 'リ': 'ri', 'ル': 'ru', 'レ': 're', 'ロ': 'ro', 'ワ': 'wa', 'ヲ': 'wo', 'ン': 'n' } def test_kana(kana_dict): # Randomly select 10 kana characters random_kana = random.sample(kana_dict.keys(), 10) score = 0 for kana in random_kana: # Ask the user to input the Romanized pronunciation user_input = input(f"What is the Romanized pronunciation of '{kana}'? ") # Check if the user's input matches the correct pronunciation if user_input.strip().lower() == kana_dict[kana]: print("Correct!") score += 1 else: print(f"Wrong! The correct pronunciation is '{kana_dict[kana]}'.") # Allow the user to try again correction_input = input(f"Try again for '{kana}': ") if correction_input.strip().lower() == kana_dict[kana]: print("Correct on second attempt!") score += 0.5 # Half point for a correct second attempt else: print(f"Still wrong. The correct pronunciation is '{kana_dict[kana]}'.") # Display the final score print(f"\nYour score: {score}/10") # Run the test test_kana(kana_chart)
链接:https://pan.baidu.com/s/1dSHtAL8B8n2TUodDR0CV4A 这个是代码的exe文件,再没有python环境也可以打开使用,之后会有dmg文件 提取码:1111