View Test_Generatar.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python3 | |
import random | |
numerus = {'1':'unus', '2':'duo','3':'tres','4':'quattuor','5':'quinque','6':'sex','7':'septem','8':'octo','9':'novem','10':'decem'} | |
for quiz_num in range(6): | |
quiz_file = open('numerusquiz{}.txt'.format(quiz_num + 1), 'w') | |
answer_key_file = open('numerusquiz_answers{}.txt'.format(quiz_num + 1), 'w') |
View wiki_api.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wikipedia | |
wikipedia.set_lang('ja') | |
page = wikipedia.page('猫') | |
print(page.summary) |
View wiki_api.y
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wikipedia | |
wikipedia.set_lang('ja') | |
page = wikipedia.page('猫') | |
print(page.summary) |
View sleep.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
print("スリープ開始") | |
print("...") | |
time.sleep(3) | |
print("スリープ終了") |
View time2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
print(time.ctime()) |
View time.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
print(time.time()) |
View randomq.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
r = random.randint(1,24) | |
print(r) |
View shuffle.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
list = ['あ','い','う','え','お'] | |
random.shuffle(list) | |
print(list) |
View choice.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
moji ='あいうえお' | |
c = random.choice(moji) | |
print(c) |
View randint.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
r = random.randint(1,5) | |
print(r) |
NewerOlder