randintが使えない
import random print("初心者の人数を入力してください") beginner = int(input()) print("経験者の人数を入力してください") experienced = int(input()) print("初心者は%d人で、経験者は%d人です" % (beginner,experienced)) brand = random.radint(1,beginner) erand = random.radint(1,experienced) print(brand,erand)
を実行したところ
Traceback (most recent call last):
File "pair.py", line 9, in <module>
brand = random.radint(1,beginner)
AttributeError: module 'random' has no attribute 'radint'
というエラーができました
調べてみたところ、ファイル名が原因であるというサイトを見つけましたが、
ファイル名はpair.pyとしているため、特に問題ないように思います
解決へのご協力よろしくお願いいたします
実行環境
Anaconda python3.6をインストール
公式
備考
[xxxxxxxxxxxxxx] ANOMALY: use of REX.w is meaningless (default operand size is 6 4) [xxxxxxxxxxxxxx] ANOMALY: use of REX.w is meaningless (default operand size is 6 4)
というエラーがインストール当初より起きていますが、特に問題は起きていません
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/10/16 05:06
2017/10/16 05:08
2017/10/16 06:29