LoginSignup
6
2

More than 5 years have passed since last update.

ひらがなをランダムに出力する

Last updated at Posted at 2018-11-18

今日は。
今日(昨日)、友達とTSUTAYAに寄りました。
5枚借りると1000円でお得!なキャンペーン中だったので、この際5枚借りようってなったのですが、でもお互い特段借りたいCDも合わせて3枚ほどしかなかったので、残りの2枚はランダムで決めることにしました。

ひらがなをランダムに出力するプログラムが必要になったので、ここに記します。

# coding: utf-8
import random

k = random.randint(ord('あ'),ord('ん'))
print(chr(k))
6
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2