这有什么不对?在输入3(<= 5)时,输出应该是,我认为,"Phew,......"但它仍然是"很棒,......"
weather = raw_input('How is the weather today, from 0 to 10? ')
answer = raw_input ('Are you in mood to go out? ')
if weather >= 5:
if answer == 'Yes':
print 'Awesome, I will go out!'
print 'Will you come with me?'
else:
print 'Awesome, I am going out now!'
elif weather <= 5:
print "Phew, I didn't want to go outside, great, I will stay in! Thank God!"
else:
print "Huh?"
Run Code Online (Sandbox Code Playgroud)