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') |
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) |
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) |
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("スリープ終了") |
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()) |
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()) |
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) |
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) |
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) |
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