私は新しい Python ユーザーです。助けていただければ幸いです。私のコードは次のとおりです。
from sys import argvs
script, mum_mood, dad_mood = argvs
自分の機能
def dad_and_mum_mood(mum_mood, dad_mood):
print "If both mum and dad are in a good mood, all is good."
print "If one is and one isn't, all is good."
print "If both are in a bad mood, not so good."
print "Mum is in a %s mood" % (mum_mood)
print "Dad is in a %s mood" % (dad_mood)
print "Where does that leave us?"
?
dad_and_mum_mood(mum_mood, dad_mood)
sから情報mum_mood
を取得しようとしているだけです(コマンドラインに書き込まれます)が、エラーが発生します。dad_mood
argv
ImportError: cannot import name argvs
なぜこれがうまくいかないのか分かりますか?助けてくれてありがとう。
敬具