这里的错误究竟是什么?这是返回声明吗?

时间:2014-08-05 18:08:31

标签: python

确保the_flying_circus()返回True

def the_flying_circus(): 
    if 45 > 34 and ( 49 == 7**2 ) :    
       Print ("nandy is sweet")
       Return (True)

    elif 73 >= 70+3 or ( 12 < 24  ): # an elif after if 
       Print ("raju is bad")
       Return (True) # the return is right ?
    else:
       Print ("go back to school")

    # codeacademy says there is an error but is not telling what it is 

2 个答案:

答案 0 :(得分:2)

你的P印刷版是大写的,你的R作为回报。它应该是打印并返回

答案 1 :(得分:0)

确保您不会在&#34; print&#34;中使用大写字母。并且&#34;返回&#34;语句,代码运行正常。

def the_flying_circus(): 
    if 45 > 34 and ( 49 == 7**2 ) :    
       print ("nandy is sweet")
       return (True)

    elif 73 >= 70+3 or ( 12 < 24  ): # an elif after if 
       print ("raju is bad")
       return (True) # the return is right ?
   else:
       print ("go back to school")