a=15if a>13: print(5,end="")if a>14: print(20,end="")if a>15: print(35,end="")
举一反三
- a=15if a>15:print(5,end="") elif a>10:print(20,end="")elif a>5:print(35,end="")
- 写出运行结果:a=15if a>15:print(5,end="")if a>10:print(20,end="")if a>5:print(35,end="")
- 以下程序的运行结果为:a=15if a>15: print(5,end="")if a>10: print(20,end="")if a>5: print(35,end="")
- a=15 if a>15: print(5,end="") if a>10: print(20,end="") if a>5: print(35,end="")
- 阅读下面的python程序,请问输出结果是什么? Print(“T”,end=’’) if not 0 else print (‘F’,end=’’) Print(“T”,end=’’)if 6 else print (‘F’,end=’’) Print(“T”,end=’’)if””else print(‘F‘,end=’’) Print(“T”,end=’’)if”abc”else print(‘F’,end=’’) Print(“T”,end=’’)if____else print (‘F’,end=’’) Print(“T”,end=’’)if(1,2)else print(‘F’,end=’’) Print(“T”,end=’’)if[ ]else print(‘F’,end=’’) Print(“T”,end=’’)if[1,2]else print(‘F’,end=’’) Print(“T”,end=’’)if{ }else print(‘F’,end=’’) Print(“T”,end=’’)if{1,2}else print(‘F’,end=’’)