さて、私は6周年のガールフレンドのためにコードを作成しています。私はプログラミングに完全に精通しています。私は、ユーザー(彼女)が文字列出力を受け取るために、基本的に数値入力の入出力マシンを作成するための非常に単純なコードを書いています。
コードを実行すると、「none」が表示され続けます。なぜ?ここに行きます。
def love(n):
if n < 0 :
print "Why would it be negative?!"
if n == 0 :
print "well that is just hurtful"
if n == 1 :
print "I REALLY love you"
if n == 2 :
print "You make me smile at least once, each and every day"
if n == 3 :
print"you wouldn't believe how annoying it was to get this program to run properly! but it was worth it"
if n == 4 :
print "let's " + "shoot a little higher than that"
else:
print "I honestly can't see myself without you anymore"
print love(0)
print "Wanna try again? :D "