Skip to main content
 首页 » 编程设计

python之n == 7 给我一个缩进错误

2025年05月04日11qlqwjy

<分区>

# Rate Our Love !!  
 
def love(n): 
    if n < 0 :  
        print "Why would it be negative?!"  
    elif n == 0 :  
        print "well that is just hurtful"  
    elif n == 1 : 
        print "I REALLY love you"  
    elif n == 2 :  
        print "You make me smile at least once, each and every day" 
    elif n == 3 :  
        print"you wouldn't believe how annoying it was to get this program to run properly! but it was worth it" 
    elif n == 4 :  
        print "let's " + "shoot a little higher than that" 
    elif n == 5 :  
        print "you're unforgettable, that's what you are"  
    elif n == 6 : 
        print "always have, always '____' *hint* fill in the blank "  
    elif n == 7 : 
        print "i could never leave you, I love you too much"  
    elif n == 8 :  
        print "an 8/10 is still only a B, maybe I'm not trying hard enough"  
    elif n == 9 :  
        print " well, I'm not perfect yet, could have seen that one coming. Guess I just have to keep trying :)"  
    elif n == 10 :  
        print " i think you're exaggerating, i really am not that good yet"      
    else: 
        print "I still really hope that we could get married someday."  

如果 n== 7 的格式与此定义的其余部分一样,为什么我会不断收到缩进错误?